Skip to content

Commit 338ab4d

Browse files
authored
Merge pull request #72 from Codeception/codecept5
Fix compatibility with Codeception 5
2 parents 1b858a2 + 851afe8 commit 338ab4d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"minimum-stability": "dev",
2020
"require": {
2121
"php": "^8.0",
22-
"codeception/codeception": "^5.0.0",
22+
"codeception/codeception": "^5.0.0-RC6",
2323
"codeception/lib-innerbrowser": "^3.0"
2424
},
2525
"require-dev": {

src/Codeception/Module/Yii2.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ public function _before(TestInterface $test)
333333

334334
// load fixtures before db transaction
335335
if ($test instanceof \Codeception\Test\Cest) {
336-
$this->loadFixtures($test->getTestClass());
336+
$this->loadFixtures($test->getTestInstance());
337+
} elseif ($test instanceof \Codeception\Test\TestCaseWrapper) {
338+
$this->loadFixtures($test->getTestCase());
337339
} else {
338340
$this->loadFixtures($test);
339341
}

0 commit comments

Comments
 (0)