Scheb\TwoFactorBundle\Tests\Security\TwoFactor\AuthenticationContextTest::getUser_objectInitialized_returnValid PHP Method

getUser_objectInitialized_returnValid() public method

public getUser_objectInitialized_returnValid ( $userObject, $expectedReturnValue )
    public function getUser_objectInitialized_returnValid($userObject, $expectedReturnValue)
    {
        //Mock the TokenInterface
        $this->token->expects($this->once())->method('getUser')->willReturn($userObject);
        $returnValue = $this->authContext->getUser();
        $this->assertEquals($expectedReturnValue, $returnValue);
    }