toFieldValue() public method

Converts data from $value to $fieldValue.
public toFieldValue ( StorageFieldValue $value, eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue )
$value eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue
Example #1
0
 /**
  * Test converting XML to Parts\Page.
  */
 public function testToFieldValue()
 {
     $storageFieldValue = new StorageFieldValue(array('dataText' => self::PAGE_XML_REFERENCE));
     $fieldValue = new FieldValue();
     $this->converter->toFieldValue($storageFieldValue, $fieldValue);
     $this->assertInstanceOf('eZ\\Publish\\Core\\FieldType\\Page\\Parts\\Page', $fieldValue->data);
     $this->assertEquals($this->pageReference, $fieldValue->data);
 }