Bolt\Tests\LoginTest::testLoginSuccessPassword PHP Method

testLoginSuccessPassword() public method

    public function testLoginSuccessPassword()
    {
        $app = $this->getApp();
        $this->addDefaultUser($app);
        $logger = $this->getMockMonolog(['debug']);
        $logger->expects($this->at(0))->method('debug')->with($this->matchesRegularExpression('#Generating authentication cookie#'));
        $logger->expects($this->at(1))->method('debug')->with($this->matchesRegularExpression('#Saving new login token#'));
        $app['logger.system'] = $logger;
        $request = Request::createFromGlobals();
        $request->server->set('HTTP_USER_AGENT', 'Bolt PHPUnit tests');
        $app['request_stack']->push($request);
        $login = new Login($app);
        $response = $login->login('admin', 'password', new AccessControlEvent($request));
        $this->assertTrue($response);
    }