@@ -401,14 +401,14 @@ Application Tests
401
401
-----------------
402
402
403
403
Application tests check the integration of all the different layers of the
404
- application (from the routing to the views). They are no different from unit tests
405
- or integration tests as far as PHPUnit is concerned, but they have a very specific
406
- workflow:
404
+ application (from the routing to the views). They are no different from
405
+ unit tests or integration tests as far as PHPUnit is concerned, but they
406
+ have a very specific workflow:
407
407
408
- * Make a request;
409
- * Click on a link or submit a form;
410
- * Test the response;
411
- * Rinse and repeat.
408
+ #. Make a request;
409
+ #. Click on a link or submit a form;
410
+ #. Test the response;
411
+ #. Rinse and repeat.
412
412
413
413
Before creating your first test, install the ``symfony/test-pack `` which
414
414
requires multiple packages providing some of the utilities used in the
@@ -418,16 +418,13 @@ tests:
418
418
419
419
$ composer require --dev symfony/test-pack
420
420
421
-
422
421
Write Your First Application Test
423
422
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
424
423
425
424
Application tests are PHP files that typically live in the ``tests/Controller ``
426
425
directory of your application. If you want to test the pages handled by your
427
426
``PostController `` class, start by creating a new ``PostControllerTest.php ``
428
- file that extends a special ``WebTestCase `` class.
429
-
430
- As an example, a test could look like this::
427
+ file that extends a special ``WebTestCase `` class::
431
428
432
429
// tests/Controller/PostControllerTest.php
433
430
namespace App\Tests\Controller;
0 commit comments