Converts field definition data in $fieldDef into $storageFieldDef.
public toStorageFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef, |
||
$fieldDef | eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition | |
$storageDef |
/** * @group fieldType * @group textBlock * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TextBlockConverter::toStorageFieldDefinition */ public function testToStorageFieldDefinition() { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); $fieldTypeConstraints->fieldSettings = new FieldSettings(array('textRows' => 15)); $fieldDef = new PersistenceFieldDefinition(array('fieldTypeConstraints' => $fieldTypeConstraints, 'defaultValue' => new TextBlockValue())); $this->converter->toStorageFieldDefinition($fieldDef, $storageFieldDef); self::assertSame(15, $storageFieldDef->dataInt1); }