spec\Newscoop\GimmeBundle\Controller\EditorialCommentsApiControllerSpec::it_should_edit_editorial_comment PHP Метод

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

public it_should_edit_editorial_comment ( Request $request, EditorialComment $comment, $form, $editorialCommentRepository, $query )
$request Symfony\Component\HttpFoundation\Request
$comment Newscoop\ArticlesBundle\Entity\EditorialComment
    function it_should_edit_editorial_comment(Request $request, EditorialComment $comment, $form, $editorialCommentRepository, $query)
    {
        $form->getData()->willReturn(array('comment' => 'edit editorial comment'));
        $editorialCommentRepository->getOneByArticleAndCommentId(1, 1, 1)->willReturn($query);
        $query->getOneOrNullResult()->willReturn($comment);
        $response = $this->editCommentAction($request, 1, 1, 1);
        $response->shouldBeAnInstanceOf('Symfony\\Component\\HttpFoundation\\Response');
        $response->getStatusCode()->shouldReturn(200);
    }