Hi team,
When running PHPUnit tests for this plugin, there are some failures/errors regarding condition_test.php. I think the failures are related to 69e5c26 where use of cm was updated with course.
Environment Details
PHP 8.1
MOODLE 4.5
MySQL 8.0
Branch: master
Here are the list of the error logs from PHPUnit:
1) availability_othercompleted_condition_testcase::test_update_dependency_id
Undefined property: stdClass::$cm
availability/condition/othercompleted/tests/condition_test.php:255
lib/phpunit/classes/advanced_testcase.php:76
2) availability_othercompleted_condition_testcase::test_constructor
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{othercompleted:cm42 COMPLETE}'
+'{othercompleted:course42 COMPLETE}'
availability/condition/othercompleted/tests/condition_test.php:132
lib/phpunit/classes/advanced_testcase.php:76
3) availability_othercompleted_condition_testcase::test_save
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
stdClass Object (
- 'cm' => 42
'e' => 1
'type' => 'othercompleted'
+ 'course' => 42
)
availability/condition/othercompleted/tests/condition_test.php:142
lib/phpunit/classes/advanced_testcase.php:76
Hi team,
When running PHPUnit tests for this plugin, there are some failures/errors regarding
condition_test.php. I think the failures are related to 69e5c26 where use ofcmwas updated withcourse.Environment Details
Here are the list of the error logs from PHPUnit: