Skip to content

DbFixtureTrait ​

Type
Trait
Namespace
craft\test
Implemented by
craft\test\fixtures\FieldLayoutFixture, craft\test\fixtures\elements\AssetFixture, craft\test\fixtures\elements\BaseElementFixture, craft\test\fixtures\elements\CategoryFixture, craft\test\fixtures\elements\EntryFixture, craft\test\fixtures\elements\GlobalSetFixture, craft\test\fixtures\elements\TagFixture, craft\test\fixtures\elements\UserFixture
Since
3.6.0

Trait DbFixtureTrait

View source

Public Properties ​

PropertyDescription
checkIntegrityboolean – Whether database integrity checks should be explicitly enabled before deleting fixture data, and then re-disabled afterwards.

checkIntegrity ​

Type
boolean
Default value
true

Whether database integrity checks should be explicitly enabled before deleting fixture data, and then re-disabled afterwards.

View source

Protected Methods ​

MethodDescription
checkIntegrity()Toggles the DB integrity check.
hardDelete()Hard-deletes everything in the database.

checkIntegrity() ​

Toggles the DB integrity check.

View source

Arguments ​

  • $check (boolean) – Whether to turn on or off the integrity check.

hardDelete() ​

Hard-deletes everything in the database.

View source