diff --git a/composer.json b/composer.json index 5da8f83..5d6a81f 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "minimum-stability": "dev", "require": { "php": "^8.0", - "codeception/codeception": "^5.0.0", + "codeception/codeception": "^5.0.0-RC6", "codeception/lib-innerbrowser": "^3.0" }, "require-dev": { diff --git a/src/Codeception/Module/Yii2.php b/src/Codeception/Module/Yii2.php index 996a91c..862ea2e 100644 --- a/src/Codeception/Module/Yii2.php +++ b/src/Codeception/Module/Yii2.php @@ -333,7 +333,9 @@ public function _before(TestInterface $test) // load fixtures before db transaction if ($test instanceof \Codeception\Test\Cest) { - $this->loadFixtures($test->getTestClass()); + $this->loadFixtures($test->getTestInstance()); + } elseif ($test instanceof \Codeception\Test\TestCaseWrapper) { + $this->loadFixtures($test->getTestCase()); } else { $this->loadFixtures($test); }