8000 feature #6962 [Bridge/PhpUnit] doc bin/simple-phpunit (nicolas-grekas… · symfony/symfony-docs@b386600 · GitHub
[go: up one dir, main page]

Skip to content

Commit b386600

Browse files
committed
feature #6962 [Bridge/PhpUnit] doc bin/simple-phpunit (nicolas-grekas, weaverryan)
This PR was merged into the master branch. Discussion ---------- [Bridge/PhpUnit] doc bin/simple-phpunit See symfony/symfony#19915 Commits ------- c600921 Making changes thanks to Javier! 46825ab [Bridge/PhpUnit] doc bin/simple-phpunit
2 parents f78d06b + c600921 commit b386600

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

components/phpunit_bridge.rst

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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+
2326
Installation
2427
------------
2528

2629
You 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 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+
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

Comments
 (0)
0