Closed jissereitsma closed 3 years ago
How about wrapping the relevant statements in a
if (class_exists(\Magento\TestFramework\Workaround\Override\Config::class))
Sounds simpler to me, because no two branches would need to be maintained.
Sounds good to me :) Working on it
When running the Quick Integration tests on Magento 2.4.1, I bumped into the following error:
Uncaught RuntimeException: Override fixture resolver isn't initialized in .../dev/tests/integration/framework/Magento/TestFramework/Workaround/Override/Fixture/Resolver.php:69
Diving into this, I see that thebootstrap.php
in Magento 2.4.X is quite different from thebootstrap.php
of the Quick Integration framework. But we can fix that! By adding the following lines of code into thebootstrap.php
file of the Quick Test framework, it works all nicely:I placed it somewhere after the
Files::setInstance
call.To be on the safe-side, I've also added the newly created
$overrideConfig
variable to theunset
line:Additionally, the
phpunit.xml.dist
file needs to include the following line:Next, in the class
TestFramework\Bootstrap\DocBlock
a new class needs to be added to the return:Now, the question is: Why not add this as a PR? Happy to do that! But because this specifically works for Magento 2.4, I wonder what the best procedure would be, because the PR would make things incompatible with Magento 2.3. Perhaps simply a new branch
magento-2.4
and a new major release 2.0?