mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-47449 completion: Ignore timemodified when comparing
This commit is contained in:
parent
504c97925c
commit
97b1a48204
1 changed files with 6 additions and 2 deletions
|
@ -195,9 +195,11 @@ class core_completionlib_testcase extends advanced_testcase {
|
|||
$changed = clone($current);
|
||||
$changed->timemodified = time();
|
||||
$changed->completionstate = COMPLETION_INCOMPLETE;
|
||||
$comparewith = new phpunit_constraint_object_is_equal_with_exceptions($changed);
|
||||
$comparewith->add_exception('timemodified', 'assertGreaterThanOrEqual');
|
||||
$c->expects($this->at(2))
|
||||
->method('internal_set_data')
|
||||
->with($cm, $changed);
|
||||
->with($cm, $comparewith);
|
||||
$c->update_state($cm, COMPLETION_INCOMPLETE);
|
||||
|
||||
// Auto, change state.
|
||||
|
@ -217,9 +219,11 @@ class core_completionlib_testcase extends advanced_testcase {
|
|||
$changed = clone($current);
|
||||
$changed->timemodified = time();
|
||||
$changed->completionstate = COMPLETION_COMPLETE_PASS;
|
||||
$comparewith = new phpunit_constraint_object_is_equal_with_exceptions($changed);
|
||||
$comparewith->add_exception('timemodified', 'assertGreaterThanOrEqual');
|
||||
$c->expects($this->at(3))
|
||||
->method('internal_set_data')
|
||||
->with($cm, $changed);
|
||||
->with($cm, $comparewith);
|
||||
$c->update_state($cm, COMPLETION_COMPLETE_PASS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue