toFieldDefinition() public method

Converts field definition data in $storageDef into $fieldDef.
public toFieldDefinition ( StorageFieldDefinition $storageDef, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef )
$storageDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
 /**
  * @group fieldType
  * @group textLine
  * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TextLineConverter::toFieldDefinition
  */
 public function testToFieldDefinition()
 {
     $defaultText = 'This is a default value';
     $fieldDef = new PersistenceFieldDefinition();
     $storageDef = new StorageFieldDefinition(array('dataInt1' => 100, 'dataText1' => $defaultText));
     $this->converter->toFieldDefinition($storageDef, $fieldDef);
     self::assertSame(array(TextLineConverter::STRING_LENGTH_VALIDATOR_IDENTIFIER => array('maxStringLength' => 100)), $fieldDef->fieldTypeConstraints->validators);
     self::assertSame($defaultText, $fieldDef->defaultValue->data);
     self::assertSame($defaultText, $fieldDef->defaultValue->sortKey);
 }