eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\DateTest::testToFieldValue PHP Method

testToFieldValue() public method

public testToFieldValue ( )
    public function testToFieldValue()
    {
        $storageFieldValue = new StorageFieldValue();
        $storageFieldValue->dataInt = $this->date->getTimestamp();
        $storageFieldValue->sortKeyString = '';
        $storageFieldValue->sortKeyInt = $this->date->getTimestamp();
        $fieldValue = new FieldValue();
        $this->converter->toFieldValue($storageFieldValue, $fieldValue);
        self::assertSame(array('timestamp' => $this->date->getTimestamp(), 'rfc850' => null), $fieldValue->data);
        self::assertSame($storageFieldValue->dataInt, $fieldValue->data['timestamp']);
        self::assertSame($storageFieldValue->sortKeyInt, $fieldValue->sortKey);
    }