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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2017-01-30 11:49:22 +0300
committerGitHub <noreply@github.com>2017-01-30 11:49:22 +0300
commita509c890ae192d3b71dcfb4d778f083705740c86 (patch)
tree17a52fdafe519493f113a49095b6694c8cd38cae /tests/PHPUnit/Framework
parenta3b01e53c709b333e8fef2268fe0bfd554da053f (diff)
parent2667ec85d9a7b4cbd191eb1b2c2369268b105954 (diff)
Merge pull request #11298 from piwik/3.x-dev3.0.2-b3
Release 3.0.2-b3
Diffstat (limited to 'tests/PHPUnit/Framework')
-rw-r--r--tests/PHPUnit/Framework/Fixture.php2
-rwxr-xr-xtests/PHPUnit/Framework/TestCase/SystemTestCase.php2
-rw-r--r--tests/PHPUnit/Framework/TestRequest/Response.php7
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php
index 131af64a0f..98292b366a 100644
--- a/tests/PHPUnit/Framework/Fixture.php
+++ b/tests/PHPUnit/Framework/Fixture.php
@@ -77,7 +77,7 @@ use ReflectionClass;
class Fixture extends \PHPUnit_Framework_Assert
{
const IMAGES_GENERATED_ONLY_FOR_OS = 'linux';
- const IMAGES_GENERATED_FOR_PHP = '5.5';
+ const IMAGES_GENERATED_FOR_PHP = '5.6';
const IMAGES_GENERATED_FOR_GD = '2.1.1';
const DEFAULT_SITE_NAME = 'Piwik test';
diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
index 746f4dbf0c..3048352b43 100755
--- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
@@ -121,7 +121,7 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase
{
if (!Fixture::canImagesBeIncludedInScheduledReports()) {
$this->markTestSkipped(
- 'Scheduled reports generated during integration tests will not contain the image graphs. ' .
+ '(This should not occur on Travis CI server as we expect these tests to run there). Scheduled reports generated during integration tests will not contain the image graphs. ' .
'For tests to generate images, use a machine with the following specifications : ' .
'OS = '.Fixture::IMAGES_GENERATED_ONLY_FOR_OS.', PHP = '.Fixture::IMAGES_GENERATED_FOR_PHP .
' and GD = ' . Fixture::IMAGES_GENERATED_FOR_GD
diff --git a/tests/PHPUnit/Framework/TestRequest/Response.php b/tests/PHPUnit/Framework/TestRequest/Response.php
index cc5b682be2..5969725de7 100644
--- a/tests/PHPUnit/Framework/TestRequest/Response.php
+++ b/tests/PHPUnit/Framework/TestRequest/Response.php
@@ -112,6 +112,7 @@ class Response
$apiResponse = $this->normalizePdfContent($apiResponse);
$apiResponse = $this->removeXmlFields($apiResponse);
+ $apiResponse = $this->removeTodaysDate($apiResponse);
$apiResponse = $this->normalizeDecimalFields($apiResponse);
$apiResponse = $this->normalizeEncodingPhp533($apiResponse);
$apiResponse = $this->normalizeSpaces($apiResponse);
@@ -120,6 +121,11 @@ class Response
return $apiResponse;
}
+ private function removeTodaysDate($apiResponse)
+ {
+ return str_replace(date('Y-m-d'), 'today-date-removed-in-tests', $apiResponse);
+ }
+
private function normalizeEncodingPhp533($apiResponse)
{
return str_replace('&amp;#039;', "'", $apiResponse);
@@ -175,6 +181,7 @@ class Response
$response = preg_replace('/\(D:[0-9]{14}/', '(D:19700101000000', $response);
$response = preg_replace('/\/ID \[ <.*> ]/', '', $response);
$response = preg_replace('/\/id:\[ <.*> ]/', '', $response);
+
$response = $this->removeXmlElement($response, "xmp:CreateDate");
$response = $this->removeXmlElement($response, "xmp:ModifyDate");
$response = $this->removeXmlElement($response, "xmp:MetadataDate");