minor #16278 Fix tests when no Intl extension (ewgRa)

This PR was squashed before being merged into the 2.8 branch (closes #16278).

Discussion
----------

Fix tests when no Intl extension

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

I haven't Intl extension installed and testFormatWithIntlTimeZone is fail because use \IntlTimeZone.

This PR fix it.

Commits
-------

84c7567 Fix tests when no Intl extension
This commit is contained in:
Nicolas Grekas 2015-11-05 11:18:51 +01:00
commit c0f0ad3039

View File

@ -405,9 +405,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.');
}