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 selection * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\SelectionConverter::toStorageValue */ public function testToStorageValueEmpty() { $fieldValue = new FieldValue(); $fieldValue->data = array(); $fieldValue->sortKey = ''; $expectedStorageFieldValue = new StorageFieldValue(); $expectedStorageFieldValue->dataText = ''; $expectedStorageFieldValue->sortKeyString = ''; $actualStorageFieldValue = new StorageFieldValue(); $this->converter->toStorageValue($fieldValue, $actualStorageFieldValue); $this->assertEquals($expectedStorageFieldValue, $actualStorageFieldValue); }