eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentTypeHandlerTest::testGetFieldDefinition PHP Method

testGetFieldDefinition() public method

    public function testGetFieldDefinition()
    {
        $mapperMock = $this->getMapperMock(array('extractFieldFromRow'));
        $mapperMock->expects($this->once())->method('extractFieldFromRow')->with($this->equalTo(array()))->will($this->returnValue(new FieldDefinition()));
        $gatewayMock = $this->getGatewayMock();
        $gatewayMock->expects($this->once())->method('loadFieldDefinition')->with($this->equalTo(42), $this->equalTo(Type::STATUS_DEFINED))->will($this->returnValue(array()));
        $handler = $this->getHandler();
        $fieldDefinition = $handler->getFieldDefinition(42, Type::STATUS_DEFINED);
        $this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type\\FieldDefinition', $fieldDefinition);
    }