spec\Newscoop\NewscoopBundle\Controller\TopicsControllerSpec::its_editAction_should_return_404_when_topic_not_found PHP Method

its_editAction_should_return_404_when_topic_not_found() public method

public its_editAction_should_return_404_when_topic_not_found ( $request, $repository, $csrfTokenManagerAdapter )
    public function its_editAction_should_return_404_when_topic_not_found($request, $repository, $csrfTokenManagerAdapter)
    {
        $repository->findOneBy(array('id' => 1))->willReturn(null);
        $csrfTokenManagerAdapter->isCsrfTokenValid('default', $this->token)->willReturn(true);
        $response = $this->editAction($request, 1);
        $response->getStatusCode()->shouldReturn(404);
        $response->shouldBeAnInstanceOf('Symfony\\Component\\HttpFoundation\\JsonResponse');
    }