eZ\Publish\Core\REST\Client\Tests\Input\Parser\RelationTest::testParse PHP Method

testParse() public method

Tests the section parser.
public testParse ( ) : eZ\Publish\API\Repository\Values\Content\Relation
return eZ\Publish\API\Repository\Values\Content\Relation
    public function testParse()
    {
        $relationParser = $this->getParser();
        $inputArray = array('_href' => '/content/objects/23/relations/32', '_media-type' => 'application/vnd.ez.api.Relation+xml', 'SourceContent' => array('_media-type' => 'application/vnd.ez.api.ContentInfo+xml', '_href' => '/content/objects/23'), 'DestinationContent' => array('_media-type' => 'application/vnd.ez.api.ContentInfo+xml', '_href' => '/content/objects/45'), 'RelationType' => 'COMMON');
        $this->getContentServiceMock()->expects($this->exactly(2))->method('loadContentInfo');
        $result = $relationParser->parse($inputArray, $this->getParsingDispatcherMock());
        $this->assertNotNull($result);
        return $result;
    }