1 | <?php |
||
29 | class InitDbFixture extends DbFixture |
||
30 | { |
||
31 | /** |
||
32 | * @var string the init script file that should be executed when loading this fixture. |
||
33 | * This should be either a file path or [path alias](guide:concept-aliases). Note that if the file does not exist, |
||
34 | * no error will be raised. |
||
35 | */ |
||
36 | public $initScript = '@app/tests/fixtures/initdb.php'; |
||
37 | /** |
||
38 | * @var array list of database schemas that the test tables may reside in. Defaults to |
||
39 | * `['']`, meaning using the default schema (an empty string refers to the |
||
40 | * default schema). This property is mainly used when turning on and off integrity checks |
||
41 | * so that fixture data can be populated into the database without causing problem. |
||
42 | */ |
||
43 | public $schemas = ['']; |
||
44 | |||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function beforeLoad() |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function afterLoad() |
||
61 | |||
62 | /** |
||
63 | * @inheritdoc |
||
64 | */ |
||
65 | public function load() |
||
72 | |||
73 | /** |
||
74 | * @inheritdoc |
||
75 | */ |
||
76 | public function beforeUnload() |
||
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | public function afterUnload() |
||
88 | |||
89 | /** |
||
90 | * Toggles the DB integrity check. |
||
91 | * @param bool $check whether to turn on or off the integrity check. |
||
92 | */ |
||
93 | public function checkIntegrity($check) |
||
99 | } |
||
100 |