PHP Class Webiny\Component\Security\Tests\Mocks\UserProviderMock

Inheritance: implements Webiny\Component\Security\User\UserProviderInterface
Show file Open project: Webiny/Framework Class Usage Examples

Public Properties

Property Type Description
$returnLoginObject boolean Using this static attribute we can change the return of the getUser method, enabling us to test different cases.

Public Methods

Method Description
getUser ( Login $login ) : AbstractUser Get the user from user provided for the given instance of Login object.

Method Details

getUser() public method

Get the user from user provided for the given instance of Login object.
public getUser ( Login $login ) : AbstractUser
$login Webiny\Component\Security\Authentication\Providers\Login Instance of Login object.
return Webiny\Component\Security\User\AbstractUser

Property Details

$returnLoginObject public static property

Using this static attribute we can change the return of the getUser method, enabling us to test different cases.
public static bool $returnLoginObject
return boolean