Skip to content
Extraits de code Groupes Projets
Valider 89d0ceac rédigé par mattab's avatar mattab
Parcourir les fichiers

Attempting to fix the build on php 5.3 and 5.4 by normalising spaces in XML responses too

parent 774b2e05
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Subproject commit f5557b8bcdb2ef6936b651a39f4e4f510b83bf6c
Subproject commit 643984c1bab2bc48f120e3cb83fac39b270d9481
Subproject commit 267da78ac140e117fdc7ed351c69b729014165f2
Subproject commit 140de8db1a1795178efd8b0d2f8e6208a192e562
Subproject commit 90327ea31c298d17cf14312d4eeefad7228c54a4
Subproject commit 874920ab1c338a9afe24d3c7229dc5be8e741987
......@@ -80,10 +80,6 @@ class TestRequestResponse
private function normalizeApiResponse($apiResponse)
{
if(strpos($this->requestUrl['format'], 'json') === 0) {
$apiResponse = str_replace(' ', '\u00a0', $apiResponse);
}
if ($this->shouldDeleteLiveIds()) {
$apiResponse = $this->removeAllIdsFromXml($apiResponse);
}
......@@ -112,6 +108,7 @@ class TestRequestResponse
$apiResponse = $this->removeXmlFields($apiResponse);
$apiResponse = $this->normalizeDecimalFields($apiResponse);
$apiResponse = $this->normalizeEncodingPhp533($apiResponse);
$apiResponse = $this->normaliseSpaces($apiResponse);
return $apiResponse;
}
......@@ -249,4 +246,15 @@ class TestRequestResponse
$response = str_replace('.11</revenue>', '</revenue>', $response);
return $response;
}
private function normaliseSpaces($apiResponse)
{
if (strpos($this->requestUrl['format'], 'json') === 0) {
$apiResponse = str_replace('&nbsp;', '\u00a0', $apiResponse);
}
if (strpos($this->requestUrl['format'], 'xml') === 0) {
$apiResponse = str_replace('&#xA0;', ' ', $apiResponse);
}
return $apiResponse;
}
}
\ No newline at end of file
Subproject commit 58bcc47a9245bb25ca25fd23b5f0c7b1302f3a58
Subproject commit 2073992deab2a2439fccb98c4befa1798ec6d649
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter