AuthenticationSignonTest::testAuthFailsDeny PHP Method

testAuthFailsDeny() public method

Test for PMA\libraries\plugins\auth\AuthenticationSignon::authFails
public testAuthFailsDeny ( ) : void
return void
    public function testAuthFailsDeny()
    {
        $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');
        $GLOBALS['login_without_password_is_forbidden'] = null;
        $GLOBALS['allowDeny_forbidden'] = true;
        $this->object->authFails();
        $this->assertEquals('Access denied!', $_SESSION['PMA_single_signon_error_message']);
    }