eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\DateAndTimeTest::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('rfc850' => null, 'timestamp' => 1048633200), $fieldValue->data);
        self::assertSame($storageFieldValue->dataInt, $fieldValue->data['timestamp']);
        self::assertSame($storageFieldValue->sortKeyInt, $fieldValue->sortKey);
    }