Skip to content

Commit 6d99029

Browse files
committed
feature #14731 [Testing] Restructure/rewrite testing docs (wouterj, Nyholm)
This PR was merged into the 4.4 branch. Discussion ---------- [Testing] Restructure/rewrite testing docs These are my first ideas for a better testing documentation. One of the major results of the Testing survey (and Testing initiative of @Nyholm, @weaverryan and @kbond) was a lack of good documentation beyond the basic stuff. This is a very very rough sketch of my ideas. I've mostly moved sections around and added some titles. So the actual content probably no longer reads as one article, which is going to be fixed before marking this PR as finished. Commits ------- 1091d13 Finish testing article rewrites 42cb887 Finalize testing document rewrite 1380bd7 Very rough sketch of better testing docs
2 parents dfbc46b + 1091d13 commit 6d99029

File tree

5 files changed

+528
-650
lines changed

5 files changed

+528
-650
lines changed

.doctor-rst.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,4 @@ whitelist:
9595
- ".. _`Deploying Symfony 4 Apps on Heroku`: https://devcenter.heroku.com/articles/deploying-symfony4"
9696
- '.. versionadded:: 0.2' # MercureBundle
9797
- '.. code-block:: twig'
98+
- 'End to End Tests (E2E)'

best_practices.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ Smoke Test your URLs
399399

400400
In software engineering, `smoke testing`_ consists of *"preliminary testing to
401401
reveal simple failures severe enough to reject a prospective software release"*.
402-
Using :ref:`PHPUnit data providers <testing-data-providers>` you can define a
403-
functional test that checks that all application URLs load successfully::
402+
Using `PHPUnit data providers`_ you can define a functional test that
403+
checks that all application URLs load successfully::
404404

405405
// tests/ApplicationAvailabilityFunctionalTest.php
406406
namespace App\Tests;
@@ -454,3 +454,4 @@ you must set up a redirection.
454454
.. _`feature toggles`: https://en.wikipedia.org/wiki/Feature_toggle
455455
.. _`smoke testing`: https://en.wikipedia.org/wiki/Smoke_testing_(software)
456456
.. _`Webpack`: https://webpack.js.org/
457+
.. _`PHPUnit data providers`: https://phpunit.readthedocs.io/en/stable/writing-tests-for-phpunit.html#data-providers

form/unit_testing.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ variable exists and will be available in your form themes::
121121

122122
.. tip::
123123

124-
Use :ref:`PHPUnit data providers <testing-data-providers>` to test multiple
125-
form conditions using the same test code.
124+
Use `PHPUnit data providers`_ to test multiple form conditions using
125+
the same test code.
126126

127127
.. caution::
128128

@@ -242,3 +242,5 @@ guessers using the :method:`Symfony\\Component\\Form\\Test\\FormIntegrationTestC
242242
:method:`Symfony\\Component\\Form\\Test\\FormIntegrationTestCase::getTypeExtensions`
243243
and :method:`Symfony\\Component\\Form\\Test\\FormIntegrationTestCase::getTypeGuessers`
244244
methods.
245+
246+
.. _`PHPUnit data providers`: https://phpunit.readthedocs.io/en/stable/writing-tests-for-phpunit.html#data-providers

0 commit comments

Comments
 (0)