コード例 #1
0
 public function it_gets_a_post(EngineInterface $templating, PostRepository $repository)
 {
     $repository->getOnePost(2)->shouldBeCalled();
     $templating->renderResponse(Argument::cetera())->shouldBeCalled();
     $this->simpleAction(2);
 }
コード例 #2
0
 public function simpleAction($id)
 {
     $post = $this->repository->getOnePost($id);
     return $this->templating->renderResponse('WHVBlogBundle::Blog/post.html.twig', ['post' => $post, 'current_url' => '', 'from' => 'post']);
 }