Skip to content

Commit

Permalink
Merge branch '3.4' into 4.2
Browse files Browse the repository at this point in the history
* 3.4:
  Updates the tip explaining how to set the base phpunit version
  • Loading branch information
javiereguiluz committed Jun 13, 2019
2 parents 3b35e9e + 7780a7e commit afd792b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ different class, do it explicitly using ``ClockMock::register(MyClass::class)``:

use App\MyClass;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ClockMock;
use Symfony\Bridge\PhpUnit\ClockMock;

/**
* @group time-sensitive
Expand Down Expand Up @@ -595,8 +595,13 @@ If you have installed the bridge through Composer, you can run it by calling e.g
.. tip::

Set the ``SYMFONY_PHPUNIT_VERSION`` env var to e.g. ``5.5`` to change the
base version of PHPUnit to ``5.5`` instead of the default ``5.3``.
It's possible to change the base version of PHPUnit by setting the
``SYMFONY_PHPUNIT_VERSION`` env var in the ``phpunit.xml.dist`` file (e.g.
``<server name="SYMFONY_PHPUNIT_VERSION" value="5.5" />``). This is the
preferred method as it can be committed to your version control repository.

It's also possible to set ``SYMFONY_PHPUNIT_VERSION`` as a real env var
(not defined in a :doc:`dotenv </components/dotenv>` file).

It's also possible to set this env var in the ``phpunit.xml.dist`` file.

Expand Down

0 comments on commit afd792b

Please sign in to comment.