ILIAS  release_8 Revision v8.24
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 24 of file SystemClockTest.php.

Member Function Documentation

◆ setUp()

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

Definition at line 28 of file SystemClockTest.php.

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

◆ tearDown()

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

Definition at line 33 of file SystemClockTest.php.

33 : void
34 {
35 date_default_timezone_set($this->default_timezone);
36 }

◆ testUtcClockIsNotAffectedByGlobalTimezoneChanges()

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

Definition at line 38 of file SystemClockTest.php.

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

Field Documentation

◆ $default_timezone

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

Definition at line 26 of file SystemClockTest.php.


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