Skip to content

Commit 13c4695

Browse files
committed
Fix CI complaints
1 parent ab27766 commit 13c4695

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

classes/local/datasource/restore/fields.php

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class fields {
3232
/** @var \restore_cms_activity_structure_step The stepslib controlling this process. */
3333
protected $stepslib;
3434

35+
/** @var array Components array */
36+
protected $components = [];
37+
3538
/**
3639
* Constructs the processor.
3740
*

tests/datasource_site_test.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ public function test_get_data() {
6262
$ds = new dssite($cms);
6363
$data = $ds->get_data();
6464

65-
$this->assertObjectHasAttribute('fullname', $data);
66-
$this->assertObjectHasAttribute('shortname', $data);
67-
$this->assertObjectHasAttribute('wwwroot', $data);
65+
// Some versions of PHPUnit do not have assertObjectHasProperty(), and assertObjectHasAttribute() is deprecated.
66+
$this->assertTrue(property_exists($data, 'fullname'));
67+
$this->assertTrue(property_exists($data, 'shortname'));
68+
$this->assertTrue(property_exists($data, 'wwwroot'));
6869
}
6970

7071
/**

tests/renderer_test.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function test_get_data() {
6767
foreach (dsbase::BUILTIN_DATASOURCES as $ds) {
6868
$classname = 'mod_cms\\local\\datasource\\' . $ds;
6969
$attribute = $classname::get_shortname();
70-
$this->assertObjectHasAttribute($attribute, $data);
70+
$this->assertTrue(property_exists($data, $attribute));
7171
$this->assertIsObject($data->$attribute);
7272
}
7373
}

0 commit comments

Comments
 (0)