getFieldDefinition() public method

This method returns the field definition for the given identifier.
public getFieldDefinition ( string $fieldDefinitionIdentifier ) : FieldDefinition
$fieldDefinitionIdentifier string
return FieldDefinition
 public function testGetFieldDefinitionFailure()
 {
     $contentType = new ContentType($this->contentTypeServiceMock, array('fieldDefinitionListReference' => '/content/types/23/fieldDefinitions'));
     $contentTypeServiceMock = $this->contentTypeServiceMock;
     $contentTypeServiceMock->expects($this->once())->method('loadFieldDefinitionList')->with($this->equalTo('/content/types/23/fieldDefinitions'))->will($this->returnValue($this->getFieldDefinitionListMock()));
     $this->assertEquals(null, $contentType->getFieldDefinition('non-existent'));
 }