public function testLogoutDelete()
{
$restoreInstance = PMA\libraries\Response::getInstance();
$mockResponse = $this->getMockBuilder('PMA\\libraries\\Response')->disableOriginalConstructor()->setMethods(array('isAjax', 'headersSent', 'header'))->getMock();
$mockResponse->expects($this->any())->method('headersSent')->with()->will($this->returnValue(false));
$mockResponse->expects($this->once())->method('header')->with('Location: /phpmyadmin/index.php');
$attrInstance = new ReflectionProperty('PMA\\libraries\\Response', '_instance');
$attrInstance->setAccessible(true);
$attrInstance->setValue($mockResponse);
$GLOBALS['cfg']['CaptchaLoginPrivateKey'] = '';
$GLOBALS['cfg']['CaptchaLoginPublicKey'] = '';
$GLOBALS['cfg']['LoginCookieDeleteAll'] = true;
$GLOBALS['PMA_Config']->set('PmaAbsoluteUri', '');
$GLOBALS['cfg']['Servers'] = array(1);
$_COOKIE['pmaAuth-0'] = 'test';
$this->object->logOut();
$this->assertFalse(isset($_COOKIE['pmaAuth-0']));
$attrInstance->setValue($restoreInstance);
}