From d5a9a20e2459c49890f908d0228eff0d7dc258fd Mon Sep 17 00:00:00 2001 From: mattab <matthieu.aubry@gmail.com> Date: Mon, 24 Feb 2014 09:05:43 +1300 Subject: [PATCH] Do not generate processed file for this test, if it is to be compared to another test's files --- tests/PHPUnit/Integration/BackwardsCompatibility1XTest.php | 3 ++- tests/PHPUnit/IntegrationTestCase.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/PHPUnit/Integration/BackwardsCompatibility1XTest.php b/tests/PHPUnit/Integration/BackwardsCompatibility1XTest.php index ab7a68ed17..c38c09dff7 100644 --- a/tests/PHPUnit/Integration/BackwardsCompatibility1XTest.php +++ b/tests/PHPUnit/Integration/BackwardsCompatibility1XTest.php @@ -33,7 +33,8 @@ class Test_Piwik_Integration_BackwardsCompatibility1XTest extends IntegrationTes $dateTime = '2010-03-06 11:22:33'; return array( - array('all', array('idSite' => $idSite, 'date' => $dateTime, 'compareAgainst' => 'OneVisitorTwoVisits', + array('all', array('idSite' => $idSite, 'date' => $dateTime, + 'compareAgainst' => 'OneVisitorTwoVisits', 'disableArchiving' => true)), ); } diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 42a0a3656f..701f87b3a7 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -814,7 +814,9 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase $expected = str_replace('.11</revenue>', '</revenue>', $expected); $response = str_replace('.11</revenue>', '</revenue>', $response); - file_put_contents($processedFilePath, $response); + if (empty($compareAgainst)) { + file_put_contents($processedFilePath, $response); + } try { if (strpos($requestUrl, 'format=xml') !== false) { -- GitLab