1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 04:30:29 +01:00

[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()
{
return array(
array('index.php', 'index.php'),
array('foobar/test.php', 'foobar/test.php'),
array('index.php', 'index'),
array('foobar/test.php', 'foobar/test'),
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
*/
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);
$this->assertArrayHasKey(1, $on_page);