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

Fix build by normalising spaces in JSON responses

parent 4ea1841a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -60,7 +60,6 @@ class TestRequestResponse ...@@ -60,7 +60,6 @@ class TestRequestResponse
// Cast as string is important. For example when calling // Cast as string is important. For example when calling
// with format=original, objects or php arrays can be returned. // with format=original, objects or php arrays can be returned.
// we also hide errors to prevent the 'headers already sent' in the ResponseBuilder (which sends Excel headers multiple times eg.)
$response = (string) $testRequest->process(); $response = (string) $testRequest->process();
return new TestRequestResponse($response, $params, $requestUrl); return new TestRequestResponse($response, $params, $requestUrl);
...@@ -81,6 +80,10 @@ class TestRequestResponse ...@@ -81,6 +80,10 @@ class TestRequestResponse
private function normalizeApiResponse($apiResponse) private function normalizeApiResponse($apiResponse)
{ {
if(strpos($this->requestUrl['format'], 'json') === 0) {
$apiResponse = str_replace(' ', '\u00a0', $apiResponse);
}
if ($this->shouldDeleteLiveIds()) { if ($this->shouldDeleteLiveIds()) {
$apiResponse = $this->removeAllIdsFromXml($apiResponse); $apiResponse = $this->removeAllIdsFromXml($apiResponse);
} }
...@@ -188,7 +191,7 @@ class TestRequestResponse ...@@ -188,7 +191,7 @@ class TestRequestResponse
$fieldsToRemove = @$this->params['xmlFieldsToRemove']; $fieldsToRemove = @$this->params['xmlFieldsToRemove'];
} }
$fieldsToRemove[] = 'idsubdatatable'; // TODO: had testNotSmallAfter, should still? $fieldsToRemove[] = 'idsubdatatable';
foreach ($fieldsToRemove as $xml) { foreach ($fieldsToRemove as $xml) {
$input = $this->removeXmlElement($input, $xml); $input = $this->removeXmlElement($input, $xml);
......
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