diff --git a/tests/unit/suites/libraries/cms/component/router/JComponentRouterViewTest.php b/tests/unit/suites/libraries/cms/component/router/JComponentRouterViewTest.php index c786f135b4f56..996fa6c318526 100644 --- a/tests/unit/suites/libraries/cms/component/router/JComponentRouterViewTest.php +++ b/tests/unit/suites/libraries/cms/component/router/JComponentRouterViewTest.php @@ -120,28 +120,28 @@ public function casesGetPath() $cases[] = array(array('view' => 'categories'), array('categories' => array())); // View with parent and children - $cases[] = array(array('view' => 'category', 'id' => '9'), array('category' => array('9:uncategorised'), 'categories' => array('9:uncategorised'))); + $cases[] = array(array('view' => 'category', 'id' => '9'), array('category' => array(9 => '9:uncategorised'), 'categories' => array(9 => '9:uncategorised'))); //View with parent, no children $cases[] = array(array('view' => 'article', 'id' => '42:question-for-everything', 'catid' => '9'), array( - 'article' => array('42:question-for-everything'), - 'category' => array('9:uncategorised'), - 'categories' => array('9:uncategorised') + 'article' => array(42 => '42:question-for-everything'), + 'category' => array(9 => '9:uncategorised'), + 'categories' => array(9 => '9:uncategorised') ) ); //View with parent, no children and nested view $cases[] = array(array('view' => 'article', 'id' => '42:question-for-everything', 'catid' => '20'), array( - 'article' => array('42:question-for-everything'), - 'category' => array('20:extensions', - '19:joomla', - '14:sample-data-articles' + 'article' => array(42 => '42:question-for-everything'), + 'category' => array(20 => '20:extensions', + 19 => '19:joomla', + 14 => '14:sample-data-articles' ), - 'categories' => array('20:extensions', - '19:joomla', - '14:sample-data-articles' + 'categories' => array(20 => '20:extensions', + 19 => '19:joomla', + 14 => '14:sample-data-articles' ) ) ); diff --git a/tests/unit/suites/libraries/cms/component/router/stubs/JComponentRouterViewInspector.php b/tests/unit/suites/libraries/cms/component/router/stubs/JComponentRouterViewInspector.php index cb0e56ea398ba..6c23f77e9319f 100644 --- a/tests/unit/suites/libraries/cms/component/router/stubs/JComponentRouterViewInspector.php +++ b/tests/unit/suites/libraries/cms/component/router/stubs/JComponentRouterViewInspector.php @@ -60,7 +60,7 @@ public function getCategorySegment($id, $query) if ($category) { - return array_reverse($category->getPath()); + return array_reverse($category->getPath(), true); } return array(); @@ -91,7 +91,7 @@ public function getCategoriesSegment($id, $query) */ public function getArticleSegment($id, $query) { - return array($id); + return array((int) $id => $id); } }