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
Public Properties ​
Property | Description |
---|---|
checkIntegrity | boolean – 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.
Protected Methods ​
Method | Description |
---|---|
checkIntegrity() | Toggles the DB integrity check. |
hardDelete() | Hard-deletes everything in the database. |
checkIntegrity()
​
Toggles the DB integrity check.
Arguments ​
$check
(boolean) – Whether to turn on or off the integrity check.
hardDelete()
​
Hard-deletes everything in the database.