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

testParse() public method

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