spec\Newscoop\NewscoopBundle\Controller\TopicsControllerSpec::its_addAction_should_return_403_when_invalid_csrf_token PHP Метод

its_addAction_should_return_403_when_invalid_csrf_token() публичный Метод

public its_addAction_should_return_403_when_invalid_csrf_token ( $request, $form, $repository, $topic, $csrfTokenManagerAdapter )
    public function its_addAction_should_return_403_when_invalid_csrf_token($request, $form, $repository, $topic, $csrfTokenManagerAdapter)
    {
        $csrfTokenManagerAdapter->isCsrfTokenValid('default', $this->token)->willReturn(false);
        $response = $this->addAction($request);
        $response->getStatusCode()->shouldReturn(403);
        $response->shouldBeAnInstanceOf('Symfony\\Component\\HttpFoundation\\JsonResponse');
    }