From b9f59404f86b3ca257795d647c7a934747e8b796 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli <matthieu@mnapoli.fr> Date: Wed, 15 Oct 2014 18:07:51 +1300 Subject: [PATCH] Fixing tests --- tests/PHPUnit/System/FrontControllerTest.php | 22 ++------------------ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/tests/PHPUnit/System/FrontControllerTest.php b/tests/PHPUnit/System/FrontControllerTest.php index c4d81b278b..47bdcf31c8 100644 --- a/tests/PHPUnit/System/FrontControllerTest.php +++ b/tests/PHPUnit/System/FrontControllerTest.php @@ -15,24 +15,6 @@ use Piwik\Tests\Fixture; */ class FrontControllerTest extends \PHPUnit_Framework_TestCase { - /** - * @dataProvider indexUrlsProvider - */ - public function testIndexRedirection($url) - { - $header = $this->getResponseHeader($url); - $url = 'index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday'; - $this->assertContains('Location: ' . $url, $header); - } - - public function indexUrlsProvider() - { - return array( - array(''), - array('index.php'), - ); - } - /** * @dataProvider malformedUrlsProvider */ @@ -41,7 +23,7 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase $header = $this->getResponseHeader($url); if ($redirection) { - $this->assertContains('Location: http://localhost:8000/' . $redirection . "\r\n", $header); + $this->assertContains('Location: ' . Fixture::getRootUrl() . 'tests/PHPUnit/proxy/' . $redirection . "\r\n", $header); } else { $this->assertNotContains('Location: ', $header); } @@ -72,7 +54,7 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase } $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, Fixture::getRootUrl() . $url); + curl_setopt($ch, CURLOPT_URL, Fixture::getRootUrl() . 'tests/PHPUnit/proxy/' . $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); -- GitLab