From 149b82def94b47fdcdc6dee597d18079a9d2b184 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 22 Feb 2017 21:19:15 +0100 Subject: [PATCH 1/2] Added a note about redirections to absolute URLs in tests --- testing.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing.rst b/testing.rst index 1e57b26447c..878a21437dd 100644 --- a/testing.rst +++ b/testing.rst @@ -284,8 +284,9 @@ document:: // Assert that the response is a redirect to /demo/contact $this->assertTrue( - $client->getResponse()->isRedirect('/demo/contact'), - 'response is a redirect to /demo/contact' + $client->getResponse()->isRedirect('/demo/contact') + // if the redirected URL was generated as an absolute URL + // $client->getResponse()->isRedirect('http://localhost/demo/contact') ); // ...or simply check that the response is a redirect to any URL $this->assertTrue($client->getResponse()->isRedirect()); From 0b78def8c225f18b872a0cc3f56a3b12e3e797d1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 22 Feb 2017 21:20:57 +0100 Subject: [PATCH 2/2] Fixed a typo --- testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing.rst b/testing.rst index 878a21437dd..4b8412e1d81 100644 --- a/testing.rst +++ b/testing.rst @@ -285,7 +285,7 @@ document:: // Assert that the response is a redirect to /demo/contact $this->assertTrue( $client->getResponse()->isRedirect('/demo/contact') - // if the redirected URL was generated as an absolute URL + // if the redirection URL was generated as an absolute URL // $client->getResponse()->isRedirect('http://localhost/demo/contact') ); // ...or simply check that the response is a redirect to any URL