Skip to content
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
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 @@ -790,7 +790,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 @@ -825,7 +825,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 @@ -842,10 +842,10 @@ section:
<filter>
<whitelist>
<!-- ... -->
<directory>../lib</directory>
<directory>lib</directory>
<exclude>
<!-- ... -->
<directory>../lib/tests</directory>
<directory>lib/tests</directory>
</exclude>
</whitelist>
</filter>
Expand Down