-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Bridge/PhpUnit] doc bin/simple-phpunit #6962
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
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,16 @@ It comes with the following features: | |
|
||
* Provides a ``ClockMock`` helper class for time-sensitive tests. | ||
|
||
* Provides a modified version of phpunit that does not embed ``symfony/yaml`` nor | ||
``prophecy`` to prevent any conflicts with these dependencies. | ||
|
||
Installation | ||
------------ | ||
|
||
You can install the component in 2 different ways: | ||
|
||
* :doc:`Install it via Composer </components/using_components>` | ||
(``symfony/phpunit-bridge`` on `Packagist`_); as a dev dependency; | ||
(``symfony/phpunit-bridge`` on `Packagist`_); as a ``dev`` dependency; | ||
|
||
* Use the official Git repository (https://github.com/symfony/phpunit-bridge). | ||
|
||
|
@@ -326,6 +329,35 @@ namespaces in the ``phpunit.xml`` file, as done for example in the | |
</listeners> | ||
</phpunit> | ||
|
||
Modified PHPUnit script | ||
----------------------- | ||
|
||
.. versionadded:: 3.2 | ||
The modified PHPUnit script script was introduced in Symfony 3.2. | ||
|
||
This bridges provides a modified version of phpunit that you can call by using | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
its ``bin/simple-phpunit`` command. It has the following features: | ||
|
||
* Does not embed ``symfony/yaml`` nor ``prophecy`` to prevent any conflicts with | ||
these dependencies; | ||
* Uses PHPUnit 4.8 when run with PHP <=5.5 and PHPUnit 5.1 when run with PHP >=5.6; | ||
* Collects and replays skipped tests when the ``SYMFONY_PHPUNIT_SKIPPED_TESTS`` | ||
env var is defined: the env var should specify a file name that will be used for | ||
storing skipped tests on a first run, and replay them on the second run; | ||
* Parallelizes test suites execution when given a directory as argument, scanning | ||
this directory for ``phpunit.xml.dist`` files up to ``SYMFONY_PHPUNIT_MAX_DEPTH`` | ||
levels (specified as an env var, defaults to ``3``); | ||
|
||
The script writes the modified PHPUnit it builds in a directory that can be | ||
configured by the ``SYMFONY_PHPUNIT_DIR`` env var, or in the same directory as | ||
the ``simple-phpunit`` if it is not provided. | ||
|
||
If you have installed the bridge through composer, you can run it by calling e.g.: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
.. code-block:: bash | ||
|
||
$ vendor/bin/simple-phpunit | ||
|
||
.. _PHPUnit: https://phpunit.de | ||
.. _`PHPUnit event listener`: https://phpunit.de/manual/current/en/extending-phpunit.html#extending-phpunit.PHPUnit_Framework_TestListener | ||
.. _`PHP error handler`: http://php.net/manual/en/book.errorfunc.php | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bridges
->This bridge