/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->now = Time::getTestNow(); $this->frozenNow = FrozenTime::getTestNow(); $this->locale = Time::$defaultLocale; Time::$defaultLocale = 'en_US'; FrozenTime::$defaultLocale = 'en_US'; }
/** * Tests debugInfo * * @return void */ public function testDebugInfo() { $time = new Time('2014-04-20 10:10:10'); $expected = ['time' => '2014-04-20T10:10:10+0000', 'timezone' => 'UTC', 'fixedNowTime' => Time::getTestNow()->toISO8601String()]; $this->assertEquals($expected, $time->__debugInfo()); }