diff options
author | diosmosis <benaka@piwik.pro> | 2015-10-15 07:17:38 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-10-27 07:46:53 +0300 |
commit | c1c3336fb82b8591a491a2198b9e9dc0c86437bb (patch) | |
tree | 87f50289b1d9efb4a7c8c7d5e1c071dbca72716c /tests/PHPUnit | |
parent | 27dd76f547481821fb7407a53c63d7ad7e2d2193 (diff) |
HTTP Host: header can have port so don't do special manipulations during test.
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r-- | tests/PHPUnit/Framework/TestingEnvironmentManipulator.php | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php index cbd7f9185c..78369abfd9 100644 --- a/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php +++ b/tests/PHPUnit/Framework/TestingEnvironmentManipulator.php @@ -55,8 +55,6 @@ class TestingEnvironmentManipulator implements EnvironmentManipulator { $this->vars = $testingEnvironment; $this->globalObservers = $globalObservers; - - $this->removePortIfPresentInHttpHeader(); } public function makeGlobalSettingsProvider(GlobalSettingsProvider $original) @@ -236,15 +234,4 @@ class TestingEnvironmentManipulator implements EnvironmentManipulator . "Is the namespace correct? Is the file in the correct folder?"); } } - - private function removePortIfPresentInHttpHeader() - { - if (isset($_SERVER['HTTP_HOST']) - && preg_match("/(.*[^:]):([0-9]+)/", $_SERVER['HTTP_HOST'], $matches) - ) { - // phantomjs sends the port in HTTP_HOST which causes some UI tests to fail. so if it's present, we remove it here. - $_SERVER['HTTP_HOST'] = $matches[1]; - $_SERVER['SERVER_PORT'] = $matches[2]; - } - } } |