Skip to content

Commit

Permalink
feature #6378 refs #5898 Fix updates of testing.rst for 3.0 (guilliam…
Browse files Browse the repository at this point in the history
…xavier)

This PR was merged into the 3.0 branch.

Discussion
----------

refs #5898 Fix updates of testing.rst for 3.0

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 3.0+
| Fixed tickets | part of #5898

As a consequence of the following changes:
> - `app/phpunit.xml.dist` -> `phpunit.xml.dist`

1461bdc#diff-6e8b9a935e200194f4cdab04f31032a2

> - `src/AppBundle/Tests/...` -> `tests/AppBundle/...`

3083e90#diff-6e8b9a935e200194f4cdab04f31032a2

Commits
-------

a6a90f7 refs #5898 Fix updates of testing.rst for 3.0
  • Loading branch information
wouterj committed May 21, 2016
2 parents a1f8c3a + a6a90f7 commit 8045693
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions book/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ called ``Calculator`` in the ``Util/`` directory of the app bundle::
}

To test this, create a ``CalculatorTest`` file in the ``tests/AppBundle/Util`` directory
of your bundle::
of your application::

// tests/AppBundle/Util/CalculatorTest.php
namespace Tests\AppBundle\Util;
Expand All @@ -84,13 +84,13 @@ of your bundle::

.. note::

By convention, the ``Tests/AppBundle`` directory should replicate the directory
By convention, the ``tests/AppBundle`` directory should replicate the directory
of your bundle for unit tests. So, if you're testing a class in the
``AppBundle/Util/`` directory, put the test in the ``tests/AppBundle/Util/``
``src/AppBundle/Util/`` directory, put the test in the ``tests/AppBundle/Util/``
directory.

Just like in your real application - autoloading is automatically enabled
via the ``autoload.php`` file (as configured by default in the
via the ``app/autoload.php`` file (as configured by default in the
``phpunit.xml.dist`` file).

Running tests for a given file or directory is also very easy:
Expand Down Expand Up @@ -835,7 +835,7 @@ PHPUnit Configuration

Each application has its own PHPUnit configuration, stored in the
``phpunit.xml.dist`` file. You can edit this file to change the defaults or
create an ``phpunit.xml`` file to set up a configuration for your local machine
create a ``phpunit.xml`` file to set up a configuration for your local machine
only.

.. tip::
Expand Down Expand Up @@ -870,7 +870,7 @@ configuration adds tests from a custom ``lib/tests`` directory:
<testsuites>
<testsuite name="Project Test Suite">
<!-- ... --->
<directory>../lib/tests</directory>
<directory>lib/tests</directory>
</testsuite>
</testsuites>
<!-- ... --->
Expand All @@ -887,10 +887,10 @@ section:
<filter>
<whitelist>
<!-- ... -->
<directory>../lib</directory>
<directory>lib</directory>
<exclude>
<!-- ... -->
<directory>../lib/tests</directory>
<directory>lib/tests</directory>
</exclude>
</whitelist>
</filter>
Expand Down

0 comments on commit 8045693

Please sign in to comment.