diff options
Diffstat (limited to 'tests/PHPUnit/Framework/TestRequest/Response.php')
-rw-r--r-- | tests/PHPUnit/Framework/TestRequest/Response.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/TestRequest/Response.php b/tests/PHPUnit/Framework/TestRequest/Response.php index 56d4c7080d..dd7b13baaf 100644 --- a/tests/PHPUnit/Framework/TestRequest/Response.php +++ b/tests/PHPUnit/Framework/TestRequest/Response.php @@ -90,6 +90,7 @@ class Response private function normalizeApiResponse($apiResponse) { $apiResponse = $this->removeSubtableIdsFromXml($apiResponse); + $apiResponse = $this->removePageViewIds($apiResponse); if ($this->shouldDeleteLiveIds()) { $apiResponse = $this->removeAllIdsFromXml($apiResponse); @@ -131,6 +132,15 @@ class Response return str_replace('&#039;', "'", $apiResponse); } + private function removePageViewIds($apiResponse) + { + $toRemove = array( + 'idpageview', + ); + + return $this->removeXmlFields($apiResponse, $toRemove); + } + private function removeAllIdsFromXml($apiResponse) { $toRemove = array( @@ -213,6 +223,7 @@ class Response $oldInput = $input; $input = preg_replace('/(<' . $xmlElement . '>.+?<\/' . $xmlElement . '>)/', '', $input); + $input = str_replace('<' . $xmlElement . ' />', '', $input); // check we didn't delete the whole string if ($testNotSmallAfter && $input != $oldInput) { |