Fix tests when no Intl extension

This commit is contained in:
Evgeniy Sokolov 2015-10-18 20:54:46 +02:00 committed by Nicolas Grekas
parent 6f48ec5be6
commit 84c75674fd

View File

@ -407,9 +407,12 @@ abstract class AbstractIntlDateFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('GMT+03:00', $formatter->format(0));
}
/**
* @requires extension intl
*/
public function testFormatWithIntlTimeZone()
{
if (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
if (PHP_VERSION_ID < 50500 && !method_exists('IntlDateFormatter', 'setTimeZone')) {
$this->markTestSkipped('Only in PHP 5.5+ IntlDateFormatter allows to use DateTimeZone objects.');
}