[ticket/12834] Fix tests to match what we want to have

PHPBB3-12834
This commit is contained in:
Joas Schilling 2014-07-08 17:53:06 +02:00
parent 80f8c550f9
commit 633a517791

View file

@ -23,17 +23,21 @@ class phpbb_viewonline_helper_test extends phpbb_test_case
public function session_pages_data() public function session_pages_data()
{ {
return array( return array(
array('index.php', 'index.php'), array('index.php', 'index'),
array('foobar/test.php', 'foobar/test.php'), array('foobar/test.php', 'foobar/test'),
array('', ''), array('', ''),
array('../index.php', '../index.php'), array('./../../index.php', '../../index'),
array('../subdir/index.php', '../subdir/index'),
array('../index.php', '../index'),
array('././index.php', 'index'),
array('./index.php', 'index'),
); );
} }
/** /**
* @dataProvider session_pages_data * @dataProvider session_pages_data
*/ */
public function test_get_user_page($expected, $session_page) public function test_get_user_page($session_page, $expected)
{ {
$on_page = $this->viewonline_helper->get_user_page($session_page); $on_page = $this->viewonline_helper->get_user_page($session_page);
$this->assertArrayHasKey(1, $on_page); $this->assertArrayHasKey(1, $on_page);