eZ\Publish\Core\REST\Server\Tests\Output\ValueObjectVisitor\RelationListTest::testVisit PHP Method

testVisit() public method

Test the RelationList visitor.
public testVisit ( ) : string
return string
    public function testVisit()
    {
        $visitor = $this->getVisitor();
        $generator = $this->getGenerator();
        $generator->startDocument(null);
        $relationList = new RelationList(array(), 42, 21);
        $this->addRouteExpectation('ezpublish_rest_loadVersionRelations', array('contentId' => $relationList->contentId, 'versionNumber' => $relationList->versionNo), "/content/objects/{$relationList->contentId}/versions/{$relationList->versionNo}/relations");
        $visitor->visit($this->getVisitorMock(), $generator, $relationList);
        $result = $generator->endDocument(null);
        $this->assertNotNull($result);
        return $result;
    }