eZ\Publish\Core\REST\Common\Tests\Input\ParsingDispatcherTest::testParse PHP Method

testParse() public method

public testParse ( )
    public function testParse()
    {
        $parser = $this->createParserMock();
        $dispatcher = new Common\Input\ParsingDispatcher(['text/html' => $parser]);
        $parser->expects($this->at(0))->method('parse')->with(array(42), $dispatcher)->will($this->returnValue(23));
        $this->assertSame(23, $dispatcher->parse(array(42), 'text/html'));
    }