File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,41 @@ Log Deprecations
402
402
For turning the verbose output off and write it to a log file instead you can use
403
403
``SYMFONY_DEPRECATIONS_HELPER='logFile=/path/deprecations.log' ``.
404
404
405
+ Setting The Locale For Tests
406
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
407
+
408
+ By default, the PHPUnit Bridge forces the locale to ``C `` to avoid locale
409
+ issues in tests. This behavior can be changed by setting the
410
+ ``SYMFONY_PHPUNIT_LOCALE `` environment variable to the desired locale:
411
+
412
+ .. code-block :: bash
413
+
414
+ # .env.test
415
+ SYMFONY_PHPUNIT_LOCALE=" fr_FR"
416
+
417
+ Alternatively, you can set this environment variable in the PHPUnit
418
+ configuration file:
419
+
420
+ .. code-block :: xml
421
+
422
+ <!-- https://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
423
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
424
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/6.0/phpunit.xsd"
425
+ >
426
+
427
+ <!-- ... -->
428
+
429
+ <php >
430
+ <!-- ... -->
431
+ <env name =" SYMFONY_PHPUNIT_LOCALE" value =" fr_FR" />
432
+ </php >
433
+ </phpunit >
434
+
435
+ .. versionadded :: 6.4
436
+
437
+ The support for the ``SYMFONY_PHPUNIT_LOCALE `` environment variable was
438
+ introduced in Symfony 6.4.
439
+
405
440
.. _write-assertions-about-deprecations :
406
441
407
442
Write Assertions about Deprecations
You can’t perform that action at this time.
0 commit comments