Merge remote-tracking branch 'origin/master'

This commit is contained in:
Michal Čihař 2012-04-27 10:14:14 +02:00
commit 82e33ced78
2 changed files with 13 additions and 10 deletions

View File

@ -1565,6 +1565,12 @@ class PMA_Config
*/
function removeCookie($cookie)
{
if (defined('TESTSUITE')) {
if (isset($_COOKIE[$cookie])) {
unset($_COOKIE[$cookie]);
}
return true;
}
return setcookie(
$cookie,
'',
@ -1614,6 +1620,10 @@ class PMA_Config
} else {
$v = time() + $validity;
}
if (defined('TESTSUITE')) {
$_COOKIE[$cookie] = $value;
return true;
}
return setcookie(
$cookie,
$value,

View File

@ -549,13 +549,9 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
*/
public function testSetUserValue()
{
$this->object->setUserValue(null, 'lang', $GLOBALS['lang'], 'en');
$this->object->setUserValue(null, 'lang', 'cs', 'en');
$this->object->setUserValue("TEST_COOKIE_USER_VAL", '', 'cfg_val_1');
// Remove the following lines when you implement this test.
// $this->markTestIncomplete(
// 'This test has not been implemented yet.'
// );
$this->assertEquals($this->object->getUserValue("TEST_COOKIE_USER_VAL", 'fail'), 'cfg_val_1');
}
/**
@ -563,10 +559,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
*/
public function testGetUserValue()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->assertEquals($this->object->getUserValue('test_val', 'val'), 'val');
}
/**