Skip to content

Commit

Permalink
Fixing unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed May 2, 2016
1 parent 4931350 commit d81d75b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Expand Up @@ -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'
)
)
);
Expand Down
Expand Up @@ -60,7 +60,7 @@ public function getCategorySegment($id, $query)

if ($category)
{
return array_reverse($category->getPath());
return array_reverse($category->getPath(), true);
}

return array();
Expand Down Expand Up @@ -91,7 +91,7 @@ public function getCategoriesSegment($id, $query)
*/
public function getArticleSegment($id, $query)
{
return array($id);
return array((int) $id => $id);
}
}

Expand Down

0 comments on commit d81d75b

Please sign in to comment.