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

testToStorageFieldDefinitionDefaultEmpty() public method

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