@@ -28,11 +28,10 @@ command:
28
28
.. code-block :: bash
29
29
30
30
# specify the configuration directory on the command line
31
- $ phpunit -c app/
31
+ $ phpunit
32
32
33
- The ``-c `` option tells PHPUnit to look in the ``app/ `` directory for a configuration
34
- file. If you're curious about the PHPUnit options, check out the ``app/phpunit.xml.dist ``
35
- file.
33
+ PHPunit is configured by the ``phpunit.xml.dist `` file in the root of your
34
+ Symfony application.
36
35
37
36
.. tip ::
38
37
@@ -93,23 +92,23 @@ of your bundle::
93
92
94
93
Just like in your real application - autoloading is automatically enabled
95
94
via the ``bootstrap.php.cache `` file (as configured by default in the
96
- ``app/ phpunit.xml.dist `` file).
95
+ ``phpunit.xml.dist `` file).
97
96
98
97
Running tests for a given file or directory is also very easy:
99
98
100
99
.. code-block :: bash
101
100
102
101
# run all tests of the application
103
- $ phpunit -c app
102
+ $ phpunit
104
103
105
104
# run all tests in the Util directory
106
- $ phpunit -c app src/AppBundle/Tests/Util
105
+ $ phpunit src/AppBundle/Tests/Util
107
106
108
107
# run tests for the Calculator class
109
- $ phpunit -c app src/AppBundle/Tests/Util/CalculatorTest.php
108
+ $ phpunit src/AppBundle/Tests/Util/CalculatorTest.php
110
109
111
110
# run all tests for the entire Bundle
112
- $ phpunit -c app src/AppBundle/
111
+ $ phpunit src/AppBundle/
113
112
114
113
.. index ::
115
114
single: Tests; Functional tests
@@ -802,23 +801,23 @@ PHPUnit Configuration
802
801
~~~~~~~~~~~~~~~~~~~~~
803
802
804
803
Each application has its own PHPUnit configuration, stored in the
805
- ``app/ phpunit.xml.dist `` file. You can edit this file to change the defaults or
806
- create an ``app/ phpunit.xml `` file to set up a configuration for your local
807
- machine only.
804
+ ``phpunit.xml.dist `` file. You can edit this file to change the defaults or
805
+ create an ``phpunit.xml `` file to set up a configuration for your local machine
806
+ only.
808
807
809
808
.. tip ::
810
809
811
- Store the ``app/ phpunit.xml.dist `` file in your code repository and ignore
812
- the ``app/ phpunit.xml `` file.
810
+ Store the ``phpunit.xml.dist `` file in your code repository and ignore
811
+ the ``phpunit.xml `` file.
813
812
814
813
By default, only the tests from your own custom bundles stored in the standard
815
814
directories ``src/*/*Bundle/Tests ``, ``src/*/Bundle/*Bundle/Tests ``,
816
815
``src/*Bundle/Tests `` are run by the ``phpunit `` command, as configured
817
- in the ``app/ phpunit.xml.dist `` file:
816
+ in the ``phpunit.xml.dist `` file:
818
817
819
818
.. code-block :: xml
820
819
821
- <!-- app/ phpunit.xml.dist -->
820
+ <!-- phpunit.xml.dist -->
822
821
<phpunit >
823
822
<!-- ... -->
824
823
<testsuites >
@@ -836,7 +835,7 @@ configuration adds tests from a custom ``lib/tests`` directory:
836
835
837
836
.. code-block :: xml
838
837
839
- <!-- app/ phpunit.xml.dist -->
838
+ <!-- phpunit.xml.dist -->
840
839
<phpunit >
841
840
<!-- ... -->
842
841
<testsuites >
@@ -853,7 +852,7 @@ section:
853
852
854
853
.. code-block :: xml
855
854
856
- <!-- app/ phpunit.xml.dist -->
855
+ <!-- phpunit.xml.dist -->
857
856
<phpunit >
858
857
<!-- ... -->
859
858
<filter >
0 commit comments