public function testAuthFailsDBI()
{
$this->object = $this->getMockBuilder('PMA\\libraries\\plugins\\auth\\AuthenticationCookie')->disableOriginalConstructor()->setMethods(array('auth'))->getMock();
$GLOBALS['server'] = 2;
$_COOKIE['pmaAuth-2'] = 'pass';
$dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->at(0))->method('getError')->will($this->returnValue(false));
$GLOBALS['dbi'] = $dbi;
$GLOBALS['no_activity'] = '';
$GLOBALS['errno'] = 42;
$this->doMockResponse(array('Cache-Control: no-store, no-cache, must-revalidate'), array('Pragma: no-cache'));
$this->assertEquals($GLOBALS['conn_error'], '#42 Cannot log in to the MySQL server');
}