Skip to content

Commit 92de3bc

Browse files
committed
minor #8883 Recommend to use PHPUnitBridge instead of PHPUnit (javiereguiluz)
This PR was squashed before being merged into the 4.0 branch (closes #8883). Discussion ---------- Recommend to use PHPUnitBridge instead of PHPUnit This fixes #8808. Commits ------- efa9bdd Recommend to use PHPUnitBridge instead of PHPUnit
2 parents dc635ad + efa9bdd commit 92de3bc

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

setup/bundles.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ PHPUnit test report:
6969

7070
.. code-block:: terminal
7171
72-
$ phpunit
72+
# this command is available after running "composer require --dev symfony/phpunit-bridge"
73+
$ ./bin/phpunit
7374
7475
# ... PHPUnit output
7576

setup/upgrade_major.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ Now, you can start fixing the notices:
7575

7676
.. code-block:: text
7777
78-
$ phpunit
78+
# this command is available after running "composer require --dev symfony/phpunit-bridge"
79+
$ ./bin/phpunit
7980
...
8081
8182
OK (10 tests, 20 assertions)

testing.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ Symfony integrates with an independent library - called PHPUnit - to give
1515
you a rich testing framework. This article won't cover PHPUnit itself, but
1616
it has its own excellent `documentation`_.
1717

18-
.. note::
18+
First, install PHPUnit support in your Symfony application running this command:
19+
20+
.. code-block:: terminal
1921
20-
It's recommended to use the latest stable PHPUnit version, `installed as
21-
PHAR`_.
22+
$ composer require --dev phpunit
2223
2324
Each test - whether it's a unit test or a functional test - is a PHP class
2425
that should live in the ``tests/`` directory of your application. If you follow
@@ -27,7 +28,7 @@ command:
2728

2829
.. code-block:: terminal
2930
30-
$ phpunit
31+
$ ./bin/phpunit
3132
3233
PHPUnit is configured by the ``phpunit.xml.dist`` file in the root of your
3334
Symfony application.
@@ -99,16 +100,13 @@ Running tests for a given file or directory is also very easy:
99100
.. code-block:: terminal
100101
101102
# run all tests of the application
102-
$ phpunit
103+
$ ./bin/phpunit
103104
104-
# run all tests in the Util directory
105-
$ phpunit tests/Util
105+
# run all tests in the Util/ directory
106+
$ ./bin/phpunit tests/Util
106107
107108
# run tests for the Calculator class
108-
$ phpunit tests/Util/CalculatorTest.php
109-
110-
# run all tests for the entire Bundle
111-
$ phpunit tests/
109+
$ ./bin/phpunit tests/Util/CalculatorTest.php
112110
113111
.. index::
114112
single: Tests; Functional tests
@@ -926,4 +924,3 @@ Learn more
926924

927925
.. _`$_SERVER`: http://php.net/manual/en/reserved.variables.server.php
928926
.. _`documentation`: https://phpunit.de/manual/current/en/
929-
.. _`installed as PHAR`: https://phpunit.de/manual/current/en/installation.html#installation.phar

0 commit comments

Comments
 (0)