From 3eac413a866cb21b828ef94401def16b49d586ad Mon Sep 17 00:00:00 2001 From: HeahDude Date: Wed, 14 Mar 2018 21:37:08 +0100 Subject: [PATCH 1/3] Added a note for the test-pack --- testing.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/testing.rst b/testing.rst index b1eed86f99e..cc2e62aba37 100644 --- a/testing.rst +++ b/testing.rst @@ -20,7 +20,7 @@ wraps the original PHPUnit binary to provide additional features: .. code-block:: terminal - $ composer require --dev symfony/phpunit-bridge + $ composer require --dev phpunit Each test - whether it's a unit test or a functional test - is a PHP class that should live in the ``tests/`` directory of your application. If you follow @@ -29,7 +29,7 @@ command: .. code-block:: terminal - $ ./vendor/bin/simple-phpunit + $ ./bin/phpunit PHPUnit is configured by the ``phpunit.xml.dist`` file in the root of your Symfony application. @@ -101,13 +101,13 @@ Running tests for a given file or directory is also very easy: .. code-block:: terminal # run all tests of the application - $ ./vendor/bin/simple-phpunit + $ ./bin/phpunit # run all tests in the Util/ directory - $ ./vendor/bin/simple-phpunit tests/Util + $ ./bin/phpunit tests/Util # run tests for the Calculator class - $ ./vendor/bin/simple-phpunit tests/Util/CalculatorTest.php + $ ./bin/phpunit tests/Util/CalculatorTest.php .. index:: single: Tests; Functional tests @@ -260,6 +260,17 @@ document:: $client->getResponse()->getContent() ); +.. note:: + + Instead of adding each dependency individually, you can also run: + + .. code-block:: terminal + + $ composer require --dev test + + If the ``PHPUnit Bridge`` wasn't installed before, the test pack will add + it too. + .. index:: single: Tests; Assertions From 9a6b058eb938a0c6e6bab64ceadc6f2d5c7b5471 Mon Sep 17 00:00:00 2001 From: HeahDude Date: Thu, 29 Mar 2018 14:46:27 +0200 Subject: [PATCH 2/3] fixup phpunit require --- testing.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testing.rst b/testing.rst index cc2e62aba37..e1f5a75b6cc 100644 --- a/testing.rst +++ b/testing.rst @@ -20,7 +20,7 @@ wraps the original PHPUnit binary to provide additional features: .. code-block:: terminal - $ composer require --dev phpunit + $ composer require --dev symfony/phpunit-bridge Each test - whether it's a unit test or a functional test - is a PHP class that should live in the ``tests/`` directory of your application. If you follow @@ -39,6 +39,11 @@ Symfony application. Code coverage can be generated with the ``--coverage-*`` options, see the help information that is shown when using ``--help`` for more information. +.. note:: + + Thanks to Symfony Flex recipes aliases, you can require ``phpunit`` instead + of ``symfony/phpunit-bridge``. + .. index:: single: Tests; Unit tests From 8b48e9b74d9583ab6f9e1ec1c1de60ead52d670b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 22 May 2018 17:27:26 +0200 Subject: [PATCH 3/3] Rewords and simplifications --- testing.rst | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/testing.rst b/testing.rst index e1f5a75b6cc..a8979e512c3 100644 --- a/testing.rst +++ b/testing.rst @@ -39,11 +39,6 @@ Symfony application. Code coverage can be generated with the ``--coverage-*`` options, see the help information that is shown when using ``--help`` for more information. -.. note:: - - Thanks to Symfony Flex recipes aliases, you can require ``phpunit`` instead - of ``symfony/phpunit-bridge``. - .. index:: single: Tests; Unit tests @@ -265,16 +260,14 @@ document:: $client->getResponse()->getContent() ); -.. note:: +.. tip:: - Instead of adding each dependency individually, you can also run: + Instead of installing each testing dependency individually, you can use the + Symfony Test pack to install all those dependencies at once: .. code-block:: terminal - $ composer require --dev test - - If the ``PHPUnit Bridge`` wasn't installed before, the test pack will add - it too. + $ composer require --dev symfony/test-pack .. index:: single: Tests; Assertions