eZ\Publish\Core\REST\Client\Tests\Input\Parser\FieldDefinitionListTest::testParse PHP Метод

testParse() публичный Метод

Tests the section parser.
public testParse ( ) : eZ\Publish\API\Repository\Values\Content\Content
Результат eZ\Publish\API\Repository\Values\Content\Content
    public function testParse()
    {
        $fieldDefinitionListParser = $this->getParser();
        $inputArray = array('_media-type' => 'application/vnd.ez.api.FieldDefinitionList+json', '_href' => '/content/types/1/fieldDefinitions', 'FieldDefinition' => array(0 => array('_media-type' => 'application/vnd.ez.api.FieldDefinition+json', '_href' => '/content/types/1/fieldDefinitions/23'), 1 => array('_media-type' => 'application/vnd.ez.api.FieldDefinition+json', '_href' => '/content/types/1/fieldDefinitions/42')));
        $this->contentTypeServiceMock->expects($this->exactly(2))->method('loadFieldDefinition')->with($this->isType('string'));
        $result = $fieldDefinitionListParser->parse($inputArray, $this->getParsingDispatcherMock());
        $fieldDefinitionArray = $result->getFieldDefinitions();
        $this->assertInternalType('array', $fieldDefinitionArray);
    }