public function testAuthFailsMySQLError()
{
$GLOBALS['cfg']['Server']['SignonSession'] = 'newSession';
$_COOKIE['newSession'] = '42';
$this->object = $this->getMockBuilder('PMA\\libraries\\plugins\\auth\\AuthenticationSignon')->disableOriginalConstructor()->setMethods(array('auth'))->getMock();
$this->object->expects($this->exactly(1))->method('auth');
$dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->at(0))->method('getError')->will($this->returnValue('error<123>'));
$GLOBALS['dbi'] = $dbi;
$GLOBALS['no_activity'] = null;
$this->object->authFails();
$this->assertEquals('error<123>', $_SESSION['PMA_single_signon_error_message']);
}