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 textLine * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TextLineConverter::toStorageValue */ public function testToStorageValue() { $value = new FieldValue(); $value->data = "He's holding a thermal detonator!"; $value->sortKey = "He's holding"; $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); }