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