From 41b90611b2ea305a0d8cd06cf7cdd186e21806a3 Mon Sep 17 00:00:00 2001 From: benakamoorthi <benaka.moorthi@gmail.com> Date: Wed, 29 Aug 2012 23:06:58 +0000 Subject: [PATCH] Refs #2742, fix test issue. git-svn-id: http://dev.piwik.org/svn/trunk@6886 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- tests/PHPUnit/IntegrationTestCase.php | 8 ++++++++ ...orTwoVisits__subtable__API.getProcessedReport_week.xml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index a74b31b5ee..27affa6ef4 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -722,6 +722,14 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase $expected = $this->removeXmlElement($expected, 'imageGraphUrl'); $response = $this->removeXmlElement($response, 'imageGraphUrl'); } + + // if idSubtable is in request URL, make sure idSubtable values are not in any urls + if (strpos($requestUrl, 'idSubtable=') !== false) + { + $regex = "/idSubtable=[0-9]+/"; + $expected = preg_replace($regex, 'idSubtable=', $expected); + $response = preg_replace($regex, 'idSubtable=', $response); + } // is there a better way to test for the current DB type in use? if (Zend_Registry::get('db') instanceof Piwik_Db_Adapter_Mysqli) { diff --git a/tests/integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml b/tests/integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml index 72398027cb..34b31b8800 100755 --- a/tests/integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml +++ b/tests/integration/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml @@ -26,7 +26,7 @@ </metricsDocumentation> <documentation>This report contains information about the page URLs that have been visited. <br /> The table is organized hierarchically, the URLs are displayed as a folder structure.<br />Use the plus and minus icons on the left to navigate.</documentation> <actionToLoadSubTables>getPageUrls</actionToLoadSubTables> - <imageGraphUrl>index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=Actions&apiAction=getPageUrls&period=week&date=2010-03-06&idSubtable=1650</imageGraphUrl> + <imageGraphUrl>index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=Actions&apiAction=getPageUrls&period=week&date=2010-03-06&idSubtable=</imageGraphUrl> <uniqueId>Actions_getPageUrls</uniqueId> </metadata> -- GitLab