1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 01:06:48 +02:00

Merge branch 'develop-ascraeus' into develop

This commit is contained in:
Marc Alexander
2014-07-08 18:49:03 +02:00
3 changed files with 29 additions and 6 deletions

View File

@@ -17,23 +17,27 @@ class phpbb_viewonline_helper_test extends phpbb_test_case
{
parent::setUp();
$this->viewonline_helper = new \phpbb\viewonline_helper();
$this->viewonline_helper = new \phpbb\viewonline_helper(new \phpbb\filesystem());
}
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);