protected mockTokenManager ( ) : Symfony\Component\Security\Csrf\CsrfTokenManagerInterface | PHPUnit_Framework_MockObject_MockObject | ||
return | Symfony\Component\Security\Csrf\CsrfTokenManagerInterface | PHPUnit_Framework_MockObject_MockObject |
protected function mockTokenManager()
{
$tokenManager = $this->getMockBuilder('Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface')->setMethods(['getToken'])->getMockForAbstractClass();
$tokenManager->expects($this->any())->method('getToken')->willReturn(new CsrfToken('_csrf', 'testValue'));
$tokenManager->expects($this->any())->method('refreshToken')->willReturn(new CsrfToken('_csrf', 'testValue'));
return $tokenManager;
}