eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\TimeTest::testToStorageFieldDefinitionDefaultCurrentTime PHP Method

testToStorageFieldDefinitionDefaultCurrentTime() public method

    public function testToStorageFieldDefinitionDefaultCurrentTime()
    {
        $storageFieldDef = new StorageFieldDefinition();
        $fieldTypeConstraints = new FieldTypeConstraints();
        $fieldTypeConstraints->fieldSettings = new FieldSettings(array('useSeconds' => false, 'defaultType' => TimeType::DEFAULT_CURRENT_TIME));
        $fieldDef = new PersistenceFieldDefinition(array('fieldTypeConstraints' => $fieldTypeConstraints));
        $this->converter->toStorageFieldDefinition($fieldDef, $storageFieldDef);
        self::assertSame(TimeType::DEFAULT_CURRENT_TIME, $storageFieldDef->dataInt1);
        self::assertSame(0, $storageFieldDef->dataInt2);
    }