spec\Newscoop\ArticlesBundle\EventListener\HookListenerSpec::it_will_display_list_of_editorial_comments_for_article PHP Метод

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

public it_will_display_list_of_editorial_comments_for_article ( PluginHooksEvent $event, Response $response, $em, $repository, $templating )
$event Newscoop\EventDispatcher\Events\PluginHooksEvent
$response Symfony\Component\HttpFoundation\Response
    public function it_will_display_list_of_editorial_comments_for_article($event, $response, $em, $repository, $templating)
    {
        $event->getArgument('articleNumber')->willReturn(4);
        $repository->getAllByArticleNumber(4)->willReturn(array('id' => 1, 'articleNumber' => 4, 'comment' => 'test comment'));
        $templating->renderResponse('NewscoopArticlesBundle:Hook:editorialComments.html.twig', array('editorialComments' => array('id' => 1, 'articleNumber' => 4, 'comment' => 'test comment'), 'articleNumber' => 4))->willReturn($response);
        $event->addHookResponse($response)->willReturn(null);
        $this->listEditorialComments($event)->shouldReturn(true);
    }