eZ\Publish\Core\REST\Client\Tests\FieldTypeServiceTest::testGetFieldType PHP Method

testGetFieldType() public method

public testGetFieldType ( )
    public function testGetFieldType()
    {
        $fieldTypeMock = $this->getMock('eZ\\Publish\\Core\\REST\\Client\\FieldType', array(), array(), '', false);
        $fieldTypeMock->expects($this->once())->method('getFieldTypeIdentifier')->will($this->returnValue('my-type'));
        $fieldTypeService = $this->getFieldTypeService();
        $fieldTypeService->addFieldType($fieldTypeMock);
        $this->assertSame($fieldTypeMock, $fieldTypeService->getFieldType('my-type'));
    }