processLogin() public method

Call this method on your login submit page, it will trigger the authentication provider and validate the provided credentials.
public processLogin ( string $authProvider = '' ) : boolean
$authProvider string Name of the auth provider you wish to use to process the login. If you don't set it, the first registered provider will be used.
return boolean True if login is valid, false if login has failed.
Example #1
0
 /**
  * @param Firewall $firewall
  *
  * @dataProvider firewallProvider
  */
 public function testIsUserDeniedAccessOnAddressThatIsInsideAccessRules($firewall)
 {
     $firewall->processLogin('MockProvider');
     // let's authenticate the user
     Request::getInstance()->setCurrentUrl('http://admin.w3.com/about/');
     $result = $firewall->isUserAllowedAccess();
     $this->assertFalse($result);
 }