toStorageValue() public method

Converts data from $value to $storageFieldValue.
public toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, StorageFieldValue $storageFieldValue )
$value eZ\Publish\SPI\Persistence\Content\FieldValue
$storageFieldValue eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
Example #1
0
 /**
  * @group fieldType
  * @group country
  * @dataProvider providerForTestToStorageValue
  * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\CountryConverter::toStorageValue
  */
 public function testToStorageValue($data, $sortKey, $dataText, $sortKeyString)
 {
     $value = new FieldValue();
     $value->data = $data;
     $value->sortKey = $sortKey;
     $storageFieldValue = new StorageFieldValue();
     $this->converter->toStorageValue($value, $storageFieldValue);
     self::assertSame($dataText, $storageFieldValue->dataText);
     self::assertSame($sortKeyString, $storageFieldValue->sortKeyString);
 }