Bolt\Tests\BoltUnitTest::allowLogin PHP Method

allowLogin() protected method

protected allowLogin ( $app )
    protected function allowLogin($app)
    {
        $this->addDefaultUser($app);
        $users = $this->getMockUsers(['isEnabled']);
        $users->expects($this->any())->method('isEnabled')->will($this->returnValue(true));
        $app['users'] = $users;
        $permissions = $this->getMockPermissions(['isAllowed']);
        $permissions->expects($this->any())->method('isAllowed')->will($this->returnValue(true));
        $this->setService('permissions', $permissions);
        $auth = $this->getMockAccessChecker($app);
        $auth->expects($this->any())->method('isValidSession')->will($this->returnValue(true));
        $app['access_control'] = $auth;
    }