Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
82e33ced78
@ -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,
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user