diff options
author | Michal Čihař <mcihar@suse.cz> | 2012-05-14 17:31:56 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@suse.cz> | 2012-05-14 17:31:56 +0400 |
commit | a98050db2cf058856476bc8d15a7b422e5278bf1 (patch) | |
tree | ad85e702180fe23f5af7751874ac527bcdee0423 /test | |
parent | a09b488b1d7e90ebc50583a80e8b9e587ff7e792 (diff) |
Implement testGetCookiePath test
Diffstat (limited to 'test')
-rw-r--r-- | test/classes/PMA_Config_test.php | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php index bfe540adea..ae64677dfe 100644 --- a/test/classes/PMA_Config_test.php +++ b/test/classes/PMA_Config_test.php @@ -583,15 +583,30 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase } /** + * 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/', + '/', + ), ); } |