Permalink
Browse files

minor #3592 Added a tip about hardcoding URLs in functional tests (ja…

…viereguiluz)

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
  • Loading branch information...
weaverryan committed Mar 8, 2014
2 parents 178984b + b284e88 commit 6d1378e03e152851fc2d536fee77aa85a521d6af
Showing with 6 additions and 0 deletions.
  1. +6 −0 book/testing.rst
View
@@ -320,6 +320,12 @@ into your Symfony2 application::
The ``request()`` method takes the HTTP method and a URL as arguments and
returns a ``Crawler`` instance.
.. tip::
Hardcoding the request URLs is a best practice for functional tests. If the
test generates URLs using the Symfony router, it won't detect any change
made to the application URLs which may impact the end users.
Use the Crawler to find DOM elements in the Response. These elements can then
be used to click on links and submit forms::

0 comments on commit 6d1378e

Please sign in to comment.