@@ -62,7 +62,7 @@ called ``Calculator`` in the ``Util/`` directory of the app bundle::
6262 }
6363 }
6464
65- To test this, create a ``CalculatorTest `` file in the ``tests/AppBundle/ Util `` directory
65+ To test this, create a ``CalculatorTest `` file in the ``tests/Util `` directory
6666of your application::
6767
6868 // tests/Util/CalculatorTest.php
@@ -85,9 +85,9 @@ of your application::
8585
8686.. note ::
8787
88- By convention, the ``tests/AppBundle `` directory should replicate the directory
88+ By convention, the ``tests/ `` directory should replicate the directory
8989 of your bundle for unit tests. So, if you're testing a class in the
90- ``src/Util/ `` directory, put the test in the ``tests/AppBundle/ Util/ ``
90+ ``src/Util/ `` directory, put the test in the ``tests/Util/ ``
9191 directory.
9292
9393Just like in your real application - autoloading is automatically enabled
@@ -102,13 +102,13 @@ Running tests for a given file or directory is also very easy:
102102 $ phpunit
103103
104104 # run all tests in the Util directory
105- $ phpunit tests/AppBundle/ Util
105+ $ phpunit tests/Util
106106
107107 # run tests for the Calculator class
108- $ phpunit tests/AppBundle/ Util/CalculatorTest.php
108+ $ phpunit tests/Util/CalculatorTest.php
109109
110110 # run all tests for the entire Bundle
111- $ phpunit tests/AppBundle/
111+ $ phpunit tests/
112112
113113 .. index ::
114114 single: Tests; Functional tests
@@ -129,7 +129,7 @@ tests as far as PHPUnit is concerned, but they have a very specific workflow:
129129Your First Functional Test
130130~~~~~~~~~~~~~~~~~~~~~~~~~~
131131
132- Functional tests are simple PHP files that typically live in the ``tests/AppBundle/ Controller ``
132+ Functional tests are simple PHP files that typically live in the ``tests/Controller ``
133133directory for your bundle. If you want to test the pages handled by your
134134``PostController `` class, start by creating a new ``PostControllerTest.php ``
135135file that extends a special ``WebTestCase `` class.
@@ -757,7 +757,7 @@ Testing Configuration
757757---------------------
758758
759759The Client used by functional tests creates a Kernel that runs in a special
760- ``test `` environment. Since Symfony loads the ``app/ config/config_test.yml ``
760+ ``test `` environment. Since Symfony loads the ``config/packages/test/*.yaml ``
761761in the ``test `` environment, you can tweak any of your application's settings
762762specifically for testing.
763763
@@ -769,15 +769,15 @@ configuration option:
769769
770770 .. code-block :: yaml
771771
772- # app/ config/config_test.yml
772+ # config/packages/test/swiftmailer.yaml
773773
774774 # ...
775775 swiftmailer :
776776 disable_delivery : true
777777
778778 .. code-block :: xml
779779
780- <!-- app/ config/config_test .xml -->
780+ <!-- config/packages/test/swiftmailer .xml -->
781781 <?xml version =" 1.0" encoding =" UTF-8" ?>
782782 <container xmlns =" http://symfony.com/schema/dic/services"
783783 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
@@ -793,7 +793,7 @@ configuration option:
793793
794794 .. code-block :: php
795795
796- // app/ config/config_test .php
796+ // config/packages/test/swiftmailer .php
797797
798798 // ...
799799 $container->loadFromExtension('swiftmailer', array(
@@ -847,7 +847,7 @@ only.
847847 Store the ``phpunit.xml.dist `` file in your code repository and ignore
848848 the ``phpunit.xml `` file.
849849
850- By default, only the tests stored in ``/ tests `` are run via the ``phpunit `` command,
850+ By default, only the tests stored in ``tests/ `` are run via the ``phpunit `` command,
851851as configured in the ``phpunit.xml.dist `` file:
852852
853853.. code-block :: xml
0 commit comments