public static function requireIntl(TestCase
$testCase, string
$minimumIcuVersion = null
) { $minimumIcuVersion ??= Intl::
getIcuStubVersion();
// We only run tests if the version is *one specific version*.
// This condition is satisfied if
//
// * the intl extension is loaded with version Intl::getIcuStubVersion()
// * the intl extension is not loaded
if ($minimumIcuVersion && IcuVersion::
compare(Intl::
getIcuVersion(),
$minimumIcuVersion, '<', 1
)) { $testCase->
markTestSkipped('ICU version '.
$minimumIcuVersion.' is required.'
);
} // Normalize the default locale in case this is not done explicitly
// in the test
\Locale::
setDefault('en'
);
// Consequently, tests will
//
// * run only for one ICU version (see Intl::getIcuStubVersion())
// there is no need to add control structures to your tests that