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

testParse() public method

Tests the parsing of role list.
public testParse ( )
    public function testParse()
    {
        $sectionParser = $this->getParser();
        $inputArray = array('Section' => array(array('_media-type' => 'application/vnd.ez.api.Section+xml'), array('_media-type' => 'application/vnd.ez.api.Section+xml')));
        $this->getParsingDispatcherMock()->expects($this->exactly(2))->method('parse')->with(array('_media-type' => 'application/vnd.ez.api.Section+xml'), 'application/vnd.ez.api.Section+xml')->will($this->returnValue('foo'));
        $result = $sectionParser->parse($inputArray, $this->getParsingDispatcherMock());
        $this->assertEquals(array('foo', 'foo'), $result);
    }
SectionListTest