AuthenticationCookieTest::testAuthFailsErrno PHP Method

testAuthFailsErrno() public method

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