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

testParse() public method

Tests the section parser.
public testParse ( ) : eZ\Publish\API\Repository\Values\Content\VersionInfo
return eZ\Publish\API\Repository\Values\Content\VersionInfo
    public function testParse()
    {
        $relationParser = $this->getParser();
        $inputArray = array('id' => 474, 'versionNo' => 2, 'status' => 'PUBLISHED', 'modificationDate' => '2003-12-23T12:53:25+01:00', 'Creator' => array('_media-type' => 'application/vnd.ez.api.User+json', '_href' => '/user/users/14'), 'creationDate' => '2003-12-23T12:52:17+01:00', 'initialLanguageCode' => 'eng-US', 'languageCodes' => 'eng-US,ger-DE', 'names' => array('value' => array(0 => array('_languageCode' => 'eng-US', '#text' => 'Anonymous User'))), 'Content' => array('_media-type' => 'application/vnd.ez.api.ContentInfo+json', '_href' => '/content/objects/10'));
        $this->getRequestParserMock()->expects($this->once())->method('parseHref')->with('/content/objects/10', 'contentId')->will($this->returnValue(10));
        $result = $relationParser->parse($inputArray, $this->getParsingDispatcherMock());
        $this->assertNotNull($result);
        return $result;
    }