@@ -20,13 +20,16 @@ It comes with the following features:
2020
2121* Provides a ``ClockMock `` helper class for time-sensitive tests.
2222
23+ * Provides a modified version of phpunit that does not embed ``symfony/yaml `` nor
24+ ``prophecy `` to prevent any conflicts with these dependencies.
25+
2326Installation
2427------------
2528
2629You can install the component in 2 different ways:
2730
2831* :doc: `Install it via Composer </components/using_components >`
29- (``symfony/phpunit-bridge `` on `Packagist `_); as a dev dependency;
32+ (``symfony/phpunit-bridge `` on `Packagist `_); as a `` dev `` dependency;
3033
3134* Use the official Git repository (https://github.com/symfony/phpunit-bridge).
3235
@@ -326,6 +329,35 @@ namespaces in the ``phpunit.xml`` file, as done for example in the
326329 </listeners >
327330 </phpunit >
328331
332+ Modified PHPUnit script
333+ -----------------------
334+
335+ .. versionadded :: 3.2
336+ The modified PHPUnit script script was introduced in Symfony 3.2.
337+
338+ This bridges provides a modified version of phpunit that you can call by using
339+ its ``bin/simple-phpunit `` command. It has the following features:
340+
341+ * Does not embed ``symfony/yaml `` nor ``prophecy `` to prevent any conflicts with
342+ these dependencies;
343+ * Uses PHPUnit 4.8 when run with PHP <=5.5 and PHPUnit 5.1 when run with PHP >=5.6;
344+ * Collects and replays skipped tests when the ``SYMFONY_PHPUNIT_SKIPPED_TESTS ``
345+ env var is defined: the env var should specify a file name that will be used for
346+ storing skipped tests on a first run, and replay them on the second run;
347+ * Parallelizes test suites execution when given a directory as argument, scanning
348+ this directory for ``phpunit.xml.dist `` files up to ``SYMFONY_PHPUNIT_MAX_DEPTH ``
349+ levels (specified as an env var, defaults to ``3 ``);
350+
351+ The script writes the modified PHPUnit it builds in a directory that can be
352+ configured by the ``SYMFONY_PHPUNIT_DIR `` env var, or in the same directory as
353+ the ``simple-phpunit `` if it is not provided.
354+
355+ If you have installed the bridge through composer, you can run it by calling e.g.:
356+
357+ .. code-block :: bash
358+
359+ $ vendor/bin/simple-phpunit
360+
329361 .. _PHPUnit : https://phpunit.de
330362.. _`PHPUnit event listener` : https://phpunit.de/manual/current/en/extending-phpunit.html#extending-phpunit.PHPUnit_Framework_TestListener
331363.. _`PHP error handler` : http://php.net/manual/en/book.errorfunc.php
0 commit comments