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