@@ -43,6 +43,10 @@ public static function requireIntl(\PhpUnit_Framework_TestCase $testCase)
43
43
$ testCase ->markTestSkipped ('Please change ICU version to ' . Intl::getIcuStubVersion ());
44
44
}
45
45
46
+ if (IcuVersion::compare (Intl::getIcuDataVersion (), Intl::getIcuStubVersion (), '!= ' , $ precision = 1 )) {
47
+ $ testCase ->markTestSkipped ('Please change the Icu component to version 1.0.x or 1. ' . IcuVersion::normalize (Intl::getIcuStubVersion (), 1 ) . '.x ' );
48
+ }
49
+
46
50
// Normalize the default locale in case this is not done explicitly
47
51
// in the test
48
52
\Locale::setDefault ('en ' );
@@ -70,11 +74,16 @@ public static function requireFullIntl(\PhpUnit_Framework_TestCase $testCase)
70
74
$ testCase ->markTestSkipped ('The intl extension is not available. ' );
71
75
}
72
76
73
- // ... and only if the version is *one specific version*.
77
+ // ... and only if the version is *one specific version* .. .
74
78
if (IcuVersion::compare (Intl::getIcuVersion (), Intl::getIcuStubVersion (), '!= ' , $ precision = 1 )) {
75
79
$ testCase ->markTestSkipped ('Please change ICU version to ' . Intl::getIcuStubVersion ());
76
80
}
77
81
82
+ // ... and only if the data in the Icu component matches that version.
83
+ if (IcuVersion::compare (Intl::getIcuDataVersion (), Intl::getIcuStubVersion (), '!= ' , $ precision = 1 )) {
84
+ $ testCase ->markTestSkipped ('Please change the Icu component to version 1.0.x or 1. ' . IcuVersion::normalize (Intl::getIcuStubVersion (), 1 ) . '.x ' );
85
+ }
86
+
78
87
// Normalize the default locale in case this is not done explicitly
79
88
// in the test
80
89
\Locale::setDefault ('en ' );
0 commit comments