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>2013-11-21 06:52:24 +0400
committermattab <matthieu.aubry@gmail.com>2013-11-21 06:52:24 +0400
commitfd73dc735aabe28684d2243ad348481aa69bd85e (patch)
tree18f892178699a98ff752e19745d95be769f32c82
parentc6945b8bceb9eb56e2d72ff98f7f9a07b7bc0ebe (diff)
write (again) processed files after they were cleaned up
-rwxr-xr-xtests/PHPUnit/IntegrationTestCase.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php
index 030a4cff93..cb3730577d 100755
--- a/tests/PHPUnit/IntegrationTestCase.php
+++ b/tests/PHPUnit/IntegrationTestCase.php
@@ -725,15 +725,16 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
}
$response = $this->normalizePdfContent($response);
- if (empty($compareAgainst)) {
- file_put_contents($processedFilePath, $response);
- }
-
$expected = $this->loadExpectedFile($expectedFilePath);
$expectedContent = $expected;
$expected = $this->normalizePdfContent($expected);
if (empty($expected)) {
+
+ if (empty($compareAgainst)) {
+ file_put_contents($processedFilePath, $response);
+ }
+
print("The expected file is not found at '$expectedFilePath'. The Processed response was:");
print("\n----------------------------\n\n");
var_dump($response);
@@ -796,6 +797,8 @@ 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);
+
try {
if (strpos($requestUrl, 'format=xml') !== false) {
$this->assertXmlStringEqualsXmlString($expected, $response, "Differences with expected in: $processedFilePath");
@@ -807,18 +810,12 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
if (trim($response) == trim($expected)
&& empty($compareAgainst)
) {
- file_put_contents($processedFilePath, $response);
-
if(trim($expectedContent) != trim($expected)) {
file_put_contents($expectedFilePath, $expected);
}
}
} catch (Exception $ex) {
$this->comparisonFailures[] = $ex;
-
- if (!empty($compareAgainst)) {
- file_put_contents($processedFilePath, $response);
- }
}
}