Converts data from $value to $storageFieldValue.
public toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, |
||
$value | eZ\Publish\SPI\Persistence\Content\FieldValue | |
$storageFieldValue |
/** * @group fieldType * @group textBlock * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TextBlockConverter::toStorageValue */ public function testToStorageValue() { $value = new FieldValue(); $value->data = $this->longText; $value->sortKey = 'Now that we know who you are'; $storageFieldValue = new StorageFieldValue(); $this->converter->toStorageValue($value, $storageFieldValue); self::assertSame($value->data, $storageFieldValue->dataText); self::assertSame($value->sortKey, $storageFieldValue->sortKeyString); self::assertSame(0, $storageFieldValue->sortKeyInt); }