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

Skip to content

Commit 8414fb7

Browse files
javiereguiluzxabbuh
authored andcommitted
Added a note about redirections to absolute URLs in tests
1 parent 52072d1 commit 8414fb7

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
@@ -284,8 +284,9 @@ document::
284284

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

0 commit comments

Comments
 (0)
0