Skip to content
Extraits de code Groupes Projets
Valider 45985deb rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Only output process if compareAgainst is not used.

parent 0cee5b82
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -727,7 +727,9 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase ...@@ -727,7 +727,9 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
$response = preg_replace('/\(D:[0-9]{14}/', '(D:19700101000000', $response); $response = preg_replace('/\(D:[0-9]{14}/', '(D:19700101000000', $response);
$response = preg_replace('/\/ID \[ <.*> ]/', '', $response); $response = preg_replace('/\/ID \[ <.*> ]/', '', $response);
file_put_contents($processedFilePath, $response); if (empty($compareAgainst)) {
file_put_contents($processedFilePath, $response);
}
$expected = $this->loadExpectedFile($expectedFilePath); $expected = $this->loadExpectedFile($expectedFilePath);
if (empty($expected)) { if (empty($expected)) {
...@@ -800,11 +802,17 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase ...@@ -800,11 +802,17 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
$this->assertEquals($expected, $response, "Differences with expected in: $processedFilePath"); $this->assertEquals($expected, $response, "Differences with expected in: $processedFilePath");
} }
if (trim($response) == trim($expected)) { if (trim($response) == trim($expected)
&& empty($compareAgainst)
) {
file_put_contents($processedFilePath, $response); file_put_contents($processedFilePath, $response);
} }
} catch (Exception $ex) { } catch (Exception $ex) {
$this->comparisonFailures[] = $ex; $this->comparisonFailures[] = $ex;
if (!empty($compareAgainst)) {
file_put_contents($processedFilePath, $response);
}
} }
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter