[Bridge/PhpUnit] Enforce a consistent locale

This commit is contained in:
Nicolas Grekas 2015-06-30 08:53:17 +02:00
parent b6dbfa4b73
commit b04fe832ac
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ Provides utilities for PHPUnit, especially user deprecation notices management.
It comes with the following features:
* disable the garbage collector;
* enforce a consistent `C` locale;
* auto-register `class_exists` to load Doctrine annotations;
* print a user deprecation notices summary at the end of the test suite.

View File

@ -14,6 +14,9 @@ if (PHP_VERSION_ID >= 50400 && gc_enabled()) {
gc_disable();
}
// Enforce a consistent locale
setlocale(LC_ALL, 'C');
if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
AnnotationRegistry::registerLoader('class_exists');
}