Neos\Flow\Tests\Unit\Security\ContextTest::injectAuthenticationManagerSetsAReferenceToTheSecurityContextInTheAuthenticationManager PHP Method

injectAuthenticationManagerSetsAReferenceToTheSecurityContextInTheAuthenticationManager() public method

    public function injectAuthenticationManagerSetsAReferenceToTheSecurityContextInTheAuthenticationManager()
    {
        $securityContext = $this->getAccessibleMock(Context::class, ['initialize']);
        $mockAuthenticationManager = $this->createMock(AuthenticationManagerInterface::class);
        $mockAuthenticationManager->expects($this->once())->method('setSecurityContext')->with($securityContext);
        $securityContext->injectAuthenticationManager($mockAuthenticationManager);
    }
ContextTest