Inheritance: extends PMA\libraries\plugins\AuthenticationPlugin
 /**
  * Test for PMA\libraries\plugins\auth\AuthenticationHttp::authSetFails
  *
  * @return void
  *
  * @group medium
  */
 public function testAuthFails()
 {
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->at(0))->method('getError')->will($this->returnValue('error 123'));
     $dbi->expects($this->at(1))->method('getError')->will($this->returnValue('error 321'));
     $dbi->expects($this->at(2))->method('getError')->will($this->returnValue(null));
     $GLOBALS['dbi'] = $dbi;
     $GLOBALS['errno'] = 31;
     ob_start();
     $this->object->authFails();
     $result = ob_get_clean();
     $this->assertContains('<p>error 123</p>', $result);
     $this->object = $this->getMockBuilder('PMA\\libraries\\plugins\\auth\\AuthenticationHttp')->disableOriginalConstructor()->setMethods(array('authForm'))->getMock();
     $this->object->expects($this->exactly(2))->method('authForm');
     // case 2
     $GLOBALS['cfg']['Server']['host'] = 'host';
     $GLOBALS['errno'] = 1045;
     $this->assertTrue($this->object->authFails());
     // case 3
     $GLOBALS['errno'] = 1043;
     $this->assertTrue($this->object->authFails());
 }