AuthenticationCookieTest::testAuthCheckArbitrary PHP Method

testAuthCheckArbitrary() public method

Test for PMA\libraries\plugins\auth\AuthenticationConfig::authCheck
public testAuthCheckArbitrary ( ) : void
return void
    public function testAuthCheckArbitrary()
    {
        $GLOBALS['cfg']['CaptchaLoginPrivateKey'] = '';
        $GLOBALS['cfg']['CaptchaLoginPublicKey'] = '';
        $_REQUEST['old_usr'] = '';
        $_REQUEST['pma_username'] = 'testPMAUser';
        $_REQUEST['pma_servername'] = 'testPMAServer';
        $_REQUEST['pma_password'] = 'testPMAPSWD';
        $GLOBALS['cfg']['AllowArbitraryServer'] = true;
        $this->assertTrue($this->object->authCheck());
        $this->assertEquals('testPMAUser', $GLOBALS['PHP_AUTH_USER']);
        $this->assertEquals('testPMAPSWD', $GLOBALS['PHP_AUTH_PW']);
        $this->assertEquals('testPMAServer', $GLOBALS['pma_auth_server']);
        $this->assertFalse(isset($_COOKIE['pmaAuth-1']));
    }