spec\Newscoop\GimmeBundle\Serializer\Topic\TopicPathHandlerSpec::it_should_return_a_path_of_the_topic PHP Method

it_should_return_a_path_of_the_topic() public method

public it_should_return_a_path_of_the_topic ( JMS\Serializer\JsonSerializationVisitor $visitor, Topic $topic, $topicRepository )
$visitor JMS\Serializer\JsonSerializationVisitor
$topic Newscoop\NewscoopBundle\Entity\Topic
    public function it_should_return_a_path_of_the_topic(JsonSerializationVisitor $visitor, Topic $topic, $topicRepository)
    {
        $topic->getId()->willReturn(1);
        $topic->getTitle()->willReturn("Test topic");
        $topic->getParent()->willReturn("Parent topic");
        $topicRepository->getReadablePath($topic)->willReturn(" / Parent topic / Test topic");
        $type = array('name' => "topic_path", 'params' => array());
        $this->serializeToJson($visitor, $topic, $type)->shouldReturn(" / Parent topic / Test topic");
    }