ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Data\Clock\SystemClockTest Class Reference
+ Inheritance diagram for ILIAS\Data\Clock\SystemClockTest:
+ Collaboration diagram for ILIAS\Data\Clock\SystemClockTest:

Public Member Functions

 testUtcClockIsNotAffectedByGlobalTimezoneChanges ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Attributes

string $default_timezone
 

Detailed Description

Definition at line 26 of file SystemClockTest.php.

Member Function Documentation

◆ setUp()

ILIAS\Data\Clock\SystemClockTest::setUp ( )
protected

Definition at line 30 of file SystemClockTest.php.

30 : void
31 {
32 $this->default_timezone = date_default_timezone_get();
33 }

◆ tearDown()

ILIAS\Data\Clock\SystemClockTest::tearDown ( )
protected

Definition at line 35 of file SystemClockTest.php.

35 : void
36 {
37 date_default_timezone_set($this->default_timezone);
38 }

◆ testUtcClockIsNotAffectedByGlobalTimezoneChanges()

ILIAS\Data\Clock\SystemClockTest::testUtcClockIsNotAffectedByGlobalTimezoneChanges ( )

Definition at line 40 of file SystemClockTest.php.

40 : void
41 {
42 date_default_timezone_set('Africa/Windhoek');
43
44 $clock = new SystemClock();
45
46 self::assertSame('Africa/Windhoek', $clock->now()->getTimezone()->getName());
47 }

Field Documentation

◆ $default_timezone

string ILIAS\Data\Clock\SystemClockTest::$default_timezone
private

Definition at line 28 of file SystemClockTest.php.


The documentation for this class was generated from the following file: