Codeception\Module\Laravel5::amLoggedAs PHP Method

amLoggedAs() public method

Takes either an object that implements the User interface or an array of credentials.
public amLoggedAs ( Illuminate\Contracts\Auth\User | array $user, string $driver = null ) : void
$user Illuminate\Contracts\Auth\User | array
$driver string
return void
    public function amLoggedAs($user, $driver = null)
    {
        if ($user instanceof Authenticatable) {
            $this->app['auth']->driver($driver)->setUser($user);
        } else {
            $this->app['auth']->driver($driver)->attempt($user);
        }
    }