Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2012-05-14 17:31:56 +0400
committerMichal Čihař <mcihar@suse.cz>2012-05-14 17:31:56 +0400
commita98050db2cf058856476bc8d15a7b422e5278bf1 (patch)
treead85e702180fe23f5af7751874ac527bcdee0423 /test
parenta09b488b1d7e90ebc50583a80e8b9e587ff7e792 (diff)
Implement testGetCookiePath test
Diffstat (limited to 'test')
-rw-r--r--test/classes/PMA_Config_test.php25
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/',
+ '/',
+ ),
);
}