Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2016-07-21 07:12:05 +0300
committermattab <matthieu.aubry@gmail.com>2016-07-21 07:12:05 +0300
commitfe448b1b8c631b2ce883f8d1fe1daf15e96aad32 (patch)
treed1d3f441590c62070868edf740bc57bdd7d8ceb8 /tests/PHPUnit/System/EnvironmentValidationTest.php
parent474fe9693f001586391b10a303412ec4bbe21da5 (diff)
Refs #10331 #10283
Diffstat (limited to 'tests/PHPUnit/System/EnvironmentValidationTest.php')
-rw-r--r--tests/PHPUnit/System/EnvironmentValidationTest.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/PHPUnit/System/EnvironmentValidationTest.php b/tests/PHPUnit/System/EnvironmentValidationTest.php
index f96032f36d..8f87d999f3 100644
--- a/tests/PHPUnit/System/EnvironmentValidationTest.php
+++ b/tests/PHPUnit/System/EnvironmentValidationTest.php
@@ -56,7 +56,7 @@ class EnvironmentValidationTest extends SystemTestCase
$this->simulateAbsentConfigFile('config.ini.php');
$output = $this->triggerPiwikFrom('tracker');
- $this->assertContains('As Piwik is not installed yet, the Tracking API will now exit without error', $output);
+ $this->assertContains('As Piwik is not installed yet, the Tracking API cannot proceed and will exit without error.', $output);
}
public function test_NoLocalConfigFile_TriggersError_inConsole()
@@ -191,17 +191,24 @@ class EnvironmentValidationTest extends SystemTestCase
private function sendRequestToTracker()
{
- return $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/piwik.php?idsite=1&rec=1&action_name=something');
+ list($response, $info) = $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/piwik.php?idsite=1&rec=1&action_name=something');
+
+ // Check Tracker requests return 200
+ $this->assertEquals(200, $info["http_code"], 'Ok response');
+
+ return $response;
}
private function sendRequestToWeb()
{
- return $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php');
+ list($response, $info) = $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php');
+ return $response;
}
private function sendArchiveWebRequest()
{
- return $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/archive.php?token_auth=' . Fixture::getTokenAuth());
+ list($response, $info) = $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/archive.php?token_auth=' . Fixture::getTokenAuth());
+ return $response;
}
private function startConsoleProcess()
@@ -226,8 +233,10 @@ class EnvironmentValidationTest extends SystemTestCase
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$response = substr($response, $headerSize);
+ $responseInfo = curl_getinfo($ch);
+
curl_close($ch);
- return $response;
+ return array($response, $responseInfo);
}
} \ No newline at end of file