8000 minor #7521 Added a note about redirections to absolute URLs in tests… · symfony/symfony-docs@fa5fa31 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa5fa31

Browse files
committed
minor #7521 Added a note about redirections to absolute URLs in tests (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #7521). Discussion ---------- Added a note about redirections to absolute URLs in tests This fixes symfony/symfony#21189 Commits ------- 8414fb7 Added a note about redirections to absolute URLs in tests
2 parents 326f23f + 8414fb7 commit fa5fa31

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

testing.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,9 @@ document::
285285

286286
// Assert that the response is a redirect to /demo/contact
287287
$this->assertTrue(
288-
$client->getResponse()->isRedirect('/demo/contact'),
289-
'response is a redirect to /demo/contact'
288+
$client->getResponse()->isRedirect('/demo/contact')
289+
// if the redirection URL was generated as an absolute URL
290+
// $client->getResponse()->isRedirect('http://localhost/demo/contact')
290291
);
291292
// ...or simply check that the response is a redirect to any URL
292293
$this->assertTrue($client->getResponse()->isRedirect());

0 commit comments

Comments
 (0)
0