@@ -20,13 +20,16 @@ It comes with the following features:
20
20
21
21
* Provides a ``ClockMock `` helper class for time-sensitive tests.
22
22
23
+ * Provides a modified version of phpunit that does not embed ``symfony/yaml `` nor
24
+ ``prophecy `` to prevent any conflicts with these dependencies.
25
+
23
26
Installation
24
27
------------
25
28
26
29
You can install the component in 2 different ways:
27
30
28
31
* :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;
30
33
31
34
* Use the official Git repository (https://github.com/symfony/phpunit-bridge).
32
35
@@ -326,6 +329,35 @@ namespaces in the ``phpunit.xml`` file, as done for example in the
326
329
</listeners >
327
330
</phpunit >
328
331
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 bridge 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
+
329
361
.. _PHPUnit : https://phpunit.de
330
362
.. _`PHPUnit event listener` : https://phpunit.de/manual/current/en/extending-phpunit.html#extending-phpunit.PHPUnit_Framework_TestListener
331
363
.. _`PHP error handler` : http://php.net/manual/en/book.errorfunc.php
0 commit comments