/** * @test * * @return void */ public function testCanGetLinkParameter() { $this->fixture->setPublishDate(new \DateTime('2014-01-14')); $this->fixture->_setProperty('uid', 123); $this->assertEquals($this->fixture->getLinkParameter(), array('post' => '123', 'day' => '14', 'month' => '01', 'year' => '2014')); }
/** * Show action * * Redirect to post show if empty cmment create is called * * @param Post $post The post the comment is related to * * @return void */ public function showAction(Post $post) { $this->redirect('show', 'Post', NULL, $post->getLinkParameter()); }