eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\SelectionTest::testToStorageValue PHP Method

testToStorageValue() public method

public testToStorageValue ( )
    public function testToStorageValue()
    {
        $fieldValue = new FieldValue();
        $fieldValue->data = array(1, 3);
        $fieldValue->sortKey = '1-3';
        $expectedStorageFieldValue = new StorageFieldValue();
        $expectedStorageFieldValue->dataText = '1-3';
        $expectedStorageFieldValue->sortKeyString = '1-3';
        $actualStorageFieldValue = new StorageFieldValue();
        $this->converter->toStorageValue($fieldValue, $actualStorageFieldValue);
        $this->assertEquals($expectedStorageFieldValue, $actualStorageFieldValue);
    }