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
7676 yield ['PST8PDT ' ];
7777 yield ['America/Montreal ' ];
7878
79- // expired in ICU
79+ // previously expired in ICU
8080 yield ['Europe/Saratov ' ];
8181
8282 // standard
@@ -316,6 +316,17 @@ public function getDeprecatedTimezones(): iterable
316316 */
317317 public function testIntlCompatibility ()
318318 {
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+
319330 $ constraint = new Timezone ([
320331 'message ' => 'myMessage ' ,
321332 'intlCompatible ' => true ,
You can’t perform that action at this time.
0 commit comments