[Bridge/PhpUnit] Enforce a consistent locale
This commit is contained in:
parent
b6dbfa4b73
commit
b04fe832ac
@ -6,6 +6,7 @@ Provides utilities for PHPUnit, especially user deprecation notices management.
|
|||||||
It comes with the following features:
|
It comes with the following features:
|
||||||
|
|
||||||
* disable the garbage collector;
|
* disable the garbage collector;
|
||||||
|
* enforce a consistent `C` locale;
|
||||||
* auto-register `class_exists` to load Doctrine annotations;
|
* auto-register `class_exists` to load Doctrine annotations;
|
||||||
* print a user deprecation notices summary at the end of the test suite.
|
* print a user deprecation notices summary at the end of the test suite.
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@ if (PHP_VERSION_ID >= 50400 && gc_enabled()) {
|
|||||||
gc_disable();
|
gc_disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enforce a consistent locale
|
||||||
|
setlocale(LC_ALL, 'C');
|
||||||
|
|
||||||
if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
|
if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
|
||||||
AnnotationRegistry::registerLoader('class_exists');
|
AnnotationRegistry::registerLoader('class_exists');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user