eZ\Publish\Core\REST\Server\Tests\Input\Parser\FieldDefinitionUpdateTest::getFieldTypeParserMock PHP Method

getFieldTypeParserMock() protected method

Get the FieldTypeParser mock object.
protected getFieldTypeParserMock ( ) : FieldTypeParser
return eZ\Publish\Core\REST\Common\Input\FieldTypeParser
    protected function getFieldTypeParserMock()
    {
        $fieldTypeParserMock = $this->getMock('eZ\\Publish\\Core\\REST\\Common\\Input\\FieldTypeParser', array(), array(), '', false);
        $fieldTypeParserMock->expects($this->any())->method('parseValue')->will($this->returnValue('New title'));
        $fieldTypeParserMock->expects($this->any())->method('parseFieldSettings')->will($this->returnValue(array('textRows' => 24)));
        $fieldTypeParserMock->expects($this->any())->method('parseValidatorConfiguration')->will($this->returnValue(array('StringLengthValidator' => array('minStringLength' => 12, 'maxStringLength' => 24))));
        return $fieldTypeParserMock;
    }