Skip to content
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

Doc about new way of running tests #5654

Merged
merged 1 commit into from
Sep 8, 2015
Merged
Changes from all 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
21 changes: 13 additions & 8 deletions contributing/code/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ In any case, it's a good practice to run tests locally before submitting a
Before Running the Tests
------------------------

To run the Symfony test suite, `install PHPUnit`_ 4.2 (or later) first. Then,
install the external dependencies used during the tests, such as Doctrine, Twig
and Monolog. To do so, :doc:`install Composer </cookbook/composer>` and execute
the following:
To run the Symfony test suite, install the external dependencies used during the
tests, such as Doctrine, Twig and Monolog. To do so,
:doc:`install Composer </cookbook/composer>` and execute the following:

.. code-block:: bash

$ composer install
$ composer update
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need update here?

Copy link
Member

Choose a reason for hiding this comment

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

but have the same result, as the project doesn't have a lock file

Copy link
Member Author

Choose a reason for hiding this comment

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

When one works on a patch and a composer file is changed, only update works, that's why it's more generic


.. _running:

Expand All @@ -35,7 +34,7 @@ command:

.. code-block:: bash

$ phpunit
$ php ./phpunit symfony
Copy link
Contributor

Choose a reason for hiding this comment

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

is this correct?

my binary is located under bin/phpunit

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it is: we don't want your phpunit, we want symfony's one (see linked PR)

Copy link
Contributor

Choose a reason for hiding this comment

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

👍


The output should display ``OK``. If not, read the reported errors to figure out
what's going on and if the tests are broken because of the new code.
Expand All @@ -48,6 +47,12 @@ what's going on and if the tests are broken because of the new code.

.. code-block:: bash

$ phpunit src/Symfony/Component/Finder/
$ php ./phpunit src/Symfony/Component/Finder/

.. _`install PHPUnit`: https://phpunit.de/manual/current/en/installation.html
.. tip::

On Windows, install the `ConEmu`_ or `ANSICON`_ free applications to see
colored test results.

.. _ConEmu: https://code.google.com/p/conemu-maximus5/
.. _ANSICON: https://github.com/adoxa/ansicon/releases