mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix remainder of unit test warnings in PHP 8.0
This commit is contained in:
parent
e368cb2f2a
commit
334b1cc277
8 changed files with 30 additions and 19 deletions
|
|
@ -9,6 +9,7 @@ class DateTimeTest extends \Codeception\TestCase\Test
|
|||
// Add some dummy data to system configuration. Asia/Seoul offset is 32400.
|
||||
Rhymix\Framework\Config::set('locale.default_timezone', 'Asia/Seoul');
|
||||
Rhymix\Framework\Config::set('locale.internal_timezone', 10800);
|
||||
Context::set('_default_timezone', $GLOBALS['_time_zone'] = 'Asia/Seoul');
|
||||
|
||||
// Set PHP time zone to the internal time zone.
|
||||
$this->old_timezone = @date_default_timezone_get();
|
||||
|
|
@ -17,6 +18,11 @@ class DateTimeTest extends \Codeception\TestCase\Test
|
|||
|
||||
public function _after()
|
||||
{
|
||||
// Restore the default and internal timezone.
|
||||
Rhymix\Framework\Config::set('locale.default_timezone', 'Asia/Seoul');
|
||||
Rhymix\Framework\Config::set('locale.internal_timezone', 10800);
|
||||
Context::set('_default_timezone', $GLOBALS['_time_zone'] = 'Asia/Seoul');
|
||||
|
||||
// Restore the old timezone.
|
||||
date_default_timezone_set($this->old_timezone);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue