Fixture depends не работает
Добавлено: 2019.01.29, 07:19
Здравствуйте, пытаюсь сделать одну фикстуру зависимой от другой, но не получается.
Одна фикстура CategoriesFixture, другая SliderFixture
Пытаюсь сделать, чтобы SliderFixture срабатывала первой, но всегда срабатывает сначала CategoriesFixture.
Думал вдруг перепутал, ставил наоборот, но все равно не работает.
Одна фикстура CategoriesFixture, другая SliderFixture
Код: Выделить всё
<?php
namespace common\fixtures;
use yii\test\ActiveFixture;
class CategoriesFixture extends ActiveFixture
{
public $modelClass = 'common\models\Categories';
public $dataFile = '@common/fixtures/data/categories.php';
public $depends = ['common\fixtures\SliderFixture'];
}
Код: Выделить всё
<?php
namespace common\fixtures;
use yii\test\ActiveFixture;
class SliderFixture extends ActiveFixture
{
public $modelClass = 'common\models\Slider';
public $dataFile = '@common/fixtures/data/slider.php';
}
Думал вдруг перепутал, ставил наоборот, но все равно не работает.