Skip to content

Added a note for the test-pack #9452

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 3 commits into from
May 24, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -101,13 +106,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
Expand Down Expand Up @@ -260,6 +265,17 @@ document::
$client->getResponse()->getContent()
);

.. note::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this a tip instead, shouldn't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? @javiereguiluz wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping :)


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

Expand Down