/** * When a time zone is not specified, it uses the system default however it returns null in the getter method * @covers Symfony\Component\Locale\Stub\StubIntlDateFormatter::getTimeZoneId * @covers Symfony\Component\Locale\Stub\StubIntlDateFormatter::setTimeZoneId * @see StubIntlDateFormatterTest::testDefaultTimeZoneIntl() */ public function testConstructorDefaultTimeZoneStub() { $formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::MEDIUM, StubIntlDateFormatter::SHORT); // In PHP 5.5 default timezone depends on `date_default_timezone_get()` method if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) { $this->assertEquals(date_default_timezone_get(), $formatter->getTimeZoneId()); } else { $this->assertNull($formatter->getTimeZoneId()); } }
/** * When a time zone is not specified, it uses the system default however it returns null in the getter method * @covers Symfony\Component\Locale\Stub\StubIntlDateFormatter::getTimeZoneId * @covers Symfony\Component\Locale\Stub\StubIntlDateFormatter::setTimeZoneId * @see StubIntlDateFormatterTest::testDefaultTimeZoneIntl() */ public function testConstructorDefaultTimeZoneStub() { $formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::MEDIUM, StubIntlDateFormatter::SHORT); $this->assertNull($formatter->getTimeZoneId()); }