From 633a5177915682492f90499ebb53fc0d87c15785 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 8 Jul 2014 17:53:06 +0200 Subject: [PATCH] [ticket/12834] Fix tests to match what we want to have PHPBB3-12834 --- tests/viewonline/helper_test.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/viewonline/helper_test.php b/tests/viewonline/helper_test.php index e4950bb51a..2c903c6b23 100644 --- a/tests/viewonline/helper_test.php +++ b/tests/viewonline/helper_test.php @@ -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);