Skip to content

Commit 6d1378e

Browse files
committed
minor symfony#3592 Added a tip about hardcoding URLs in functional tests (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Added a tip about hardcoding URLs in functional tests | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes | Applies to | all | Fixed tickets | - Commits ------- b284e88 Fixed a minor typo 220e124 Added a tip about hardcoding URLS in functional tests
2 parents 178984b + b284e88 commit 6d1378e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

book/testing.rst

+6
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ into your Symfony2 application::
320320
The ``request()`` method takes the HTTP method and a URL as arguments and
321321
returns a ``Crawler`` instance.
322322

323+
.. tip::
324+
325+
Hardcoding the request URLs is a best practice for functional tests. If the
326+
test generates URLs using the Symfony router, it won't detect any change
327+
made to the application URLs which may impact the end users.
328+
323329
Use the Crawler to find DOM elements in the Response. These elements can then
324330
be used to click on links and submit forms::
325331

0 commit comments

Comments
 (0)