eZ\Publish\Core\REST\Common\Tests\Input\FieldTypeParserTest::testParseFieldSettings PHP Method

testParseFieldSettings() public method

    public function testParseFieldSettings()
    {
        $fieldTypeParser = $this->getFieldTypeParser();
        $fieldTypeMock = $this->fieldTypeMock;
        $this->fieldTypeServiceMock->expects($this->once())->method('getFieldType')->with($this->equalTo('some-fancy-field-type'))->will($this->returnCallback(function () use($fieldTypeMock) {
            return $fieldTypeMock;
        }));
        $fieldTypeMock->expects($this->once())->method('fieldSettingsFromHash')->with($this->equalTo(array(1, 2, 3)))->will($this->returnValue(array('foo', 'bar')));
        $this->assertEquals(array('foo', 'bar'), $fieldTypeParser->parseFieldSettings('some-fancy-field-type', array(1, 2, 3)));
    }