|
- <?php
-
- namespace tests\codeception\common\_support;
-
- use tests\codeception\common\fixtures\UserFixture;
- use Codeception\Module;
- use yii\test\FixtureTrait;
-
-
- class FixtureHelper extends Module
- {
-
-
-
- use FixtureTrait {
- loadFixtures as protected;
- fixtures as protected;
- globalFixtures as protected;
- unloadFixtures as protected;
- getFixtures as protected;
- getFixture as protected;
- }
-
-
-
- public function _beforeSuite($settings = [])
- {
- $this->loadFixtures();
- }
-
-
-
- public function _afterSuite()
- {
- $this->unloadFixtures();
- }
-
-
-
- public function fixtures()
- {
- return [
- 'user' => [
- 'class' => UserFixture::className(),
- 'dataFile' => '@tests/codeception/common/fixtures/data/init_login.php',
- ],
- ];
- }
- }
|