Skip to content

Added a note about PHPUnit setLocale() method #11434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ The PHPUnit Bridge

It comes with the following features:

* Forces the tests to use a consistent locale (``C``);
* Forces the tests to use a consistent locale (``C``) (if you create
locale-sensitive tests, use PHPUnit's ``setLocale()`` method);

* Auto-register ``class_exists`` to load Doctrine annotations (when used);

Expand Down Expand Up @@ -513,7 +514,7 @@ namespaces in the ``phpunit.xml`` file, as done for example in the
</listener>
</listeners>
</phpunit>

Under the hood, a PHPUnit listener injects the mocked functions in the tested
classes' namespace. In order to work as expected, the listener has to run before
the tested class ever runs. By default, the mocked functions are created when the
Expand Down