mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-53937-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
3496258903
@ -429,16 +429,17 @@ class core_competency_plan_testcase extends advanced_testcase {
|
||||
// Reopening plan: with due date in the future => duedate unchanged.
|
||||
$record = $plan->to_record();
|
||||
$record->status = plan::STATUS_COMPLETE;
|
||||
$record->duedate = time() + plan::DUEDATE_THRESHOLD + 10;
|
||||
$duedate = time() + plan::DUEDATE_THRESHOLD + 10;
|
||||
$record->duedate = $duedate;
|
||||
$DB->update_record(plan::TABLE, $record);
|
||||
|
||||
$success = core_competency\api::reopen_plan($plan->get_id());
|
||||
$this->assertTrue($success);
|
||||
$plan->read();
|
||||
|
||||
// Check that the due date has not changed, but allow for PHP Unit latency.
|
||||
$this->assertTrue($plan->get_duedate() >= time() + plan::DUEDATE_THRESHOLD + 10);
|
||||
$this->assertTrue($plan->get_duedate() <= time() + plan::DUEDATE_THRESHOLD + 15);
|
||||
// Check that the due date has not changed.
|
||||
$this->assertNotEquals(0, $plan->get_duedate());
|
||||
$this->assertEquals($duedate, $plan->get_duedate());
|
||||
}
|
||||
|
||||
public function test_get_by_user_and_competency() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user