Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[yii2] unloading fixtures only if `cleanup` configuration equals true. #4207
What are you trying to achieve?
after setting up
$I->haveFixtures(['store' => StoreFixture::class]); $model = new Sale(['store_id' => 1]); $this->assertTrue($model->save());
I expect that sale to be available after the test ends to be handled on other tests.
What do you get instead?
The fixtures always unload after every test so it means any foreign key will either cascade the delete to the store record or throw a db exception.