From a98050db2cf058856476bc8d15a7b422e5278bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 14 May 2012 15:31:56 +0200 Subject: [PATCH] Implement testGetCookiePath test --- test/classes/PMA_Config_test.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php index bfe540adea14..ae64677dfeec 100644 --- a/test/classes/PMA_Config_test.php +++ b/test/classes/PMA_Config_test.php @@ -583,15 +583,30 @@ public function testCheckIsHttps() } /** + * Test for getting cookie path * + * @param string $absolute The absolute URL used for phpMyAdmin + * @param string $expected Expected cookie path * - * @todo Implement testGetCookiePath(). + * @dataProvider cookieUris */ - public function testGetCookiePath() + public function testGetCookiePath($absolute, $expected) { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' + $this->object->set('PmaAbsoluteUri', $absolute); + $this->assertEquals($expected, $this->object->getCookiePath()); + } + + public function cookieUris() + { + return array( + array( + 'http://example.net/phpmyadmin/', + '/phpmyadmin/', + ), + array( + 'http://example.net/', + '/', + ), ); }