diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php index 131af64a0f080c142ee05edf8dd04eaa98821c18..98292b366a34abb310eb03284f56001ea7907b6a 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 746f4dbf0c4526a4771a5d21c70946951c5795dd..3048352b43836a3cc8b23aa2e1961633020eb7f3 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 cc5b682be2a69718b72279a9deab1c140c578c34..5969725de739c203a48265aa16b853d4df308ec4 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('&#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"); diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html index 86fa5492ac20756b60a79b061bffb5f3bd77da6d..cdbadbaa2a3c5801bebcdd073f579afb607ee6c2 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html @@ -19,7 +19,7 @@ </a> </td> <td align="right"> - <a style="font-size:16px; padding:0 15px; color:#ffffff" title="View Web Analytics reports for Site 1." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=2017-01-22"> + <a style="font-size:16px; padding:0 15px; color:#ffffff" title="View Web Analytics reports for Site 1." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> Dashboard </a> </td> diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html index 1d14d55eabde5bde4baa5d9dfe9d20529d869743..66ae5338cf408fe25425c7ee304732101dccbeba 100644 --- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html +++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html @@ -19,7 +19,7 @@ </a> </td> <td align="right"> - <a style="font-size:16px; padding:0 15px; color:#ffffff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=2017-01-22"> + <a style="font-size:16px; padding:0 15px; color:#ffffff" title="View Web Analytics reports for Piwik test." target="_blank" href="http://example.com/piwik/tests/PHPUnit/proxy/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today-date-removed-in-tests"> Dashboard </a> </td>