File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public function getValidTimezones(): iterable
76
76
yield ['PST8PDT ' ];
77
77
yield ['America/Montreal ' ];
78
78
79
- // expired in ICU
79
+ // previously expired in ICU
80
80
yield ['Europe/Saratov ' ];
81
81
82
82
// standard
@@ -316,6 +316,17 @@ public function getDeprecatedTimezones(): iterable
316
316
*/
317
317
public function testIntlCompatibility ()
318
318
{
319
+ $ reflector = new \ReflectionExtension ('intl ' );
320
+ ob_start ();
321
+ $ reflector ->info ();
322
+ $ output = strip_tags (ob_get_clean ());
323
+ preg_match ('/^ICU TZData version (?:=>)?(.*)$/m ' , $ output , $ matches );
324
+ $ tzDbVersion = isset ($ matches [1 ]) ? (int ) trim ($ matches [1 ]) : 0 ;
325
+
326
+ if (!$ tzDbVersion || 2017 <= $ tzDbVersion ) {
327
+ $ this ->markTestSkipped ('"Europe/Saratov" is expired until 2017, current version is ' .$ tzDbVersion );
328
+ }
329
+
319
330
$ constraint = new Timezone ([
320
331
'message ' => 'myMessage ' ,
321
332
'intlCompatible ' => true ,
You can’t perform that action at this time.
0 commit comments