mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'wip-mdl-48837' of https://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
cb502499da
1 changed files with 21 additions and 0 deletions
|
@ -33,6 +33,19 @@ require_once($CFG->dirroot . '/backup/util/helper/backup_cron_helper.class.php')
|
||||||
*/
|
*/
|
||||||
class backup_cron_helper_testcase extends advanced_testcase {
|
class backup_cron_helper_testcase extends advanced_testcase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var String keep system default timezone.
|
||||||
|
*/
|
||||||
|
protected $systemdefaulttimezone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup.
|
||||||
|
*/
|
||||||
|
protected function setUp() {
|
||||||
|
parent::setUp();
|
||||||
|
$this->systemdefaulttimezone = date_default_timezone_get();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test {@link backup_cron_automated_helper::calculate_next_automated_backup}.
|
* Test {@link backup_cron_automated_helper::calculate_next_automated_backup}.
|
||||||
*/
|
*/
|
||||||
|
@ -457,4 +470,12 @@ class backup_cron_helper_testcase extends advanced_testcase {
|
||||||
$this->assertEquals($expected, date('w-H:i', $next));
|
$this->assertEquals($expected, date('w-H:i', $next));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set timezone back to default.
|
||||||
|
*/
|
||||||
|
protected function tearDown() {
|
||||||
|
date_default_timezone_set($this->systemdefaulttimezone);
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue