-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] Added null check in DataFixtureSetup for the scope #39427
Comments
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @stollr, Thanks for the report and collaboration! We request you please provide us with more details on the fix provided in the PR as below:
Thanks |
Sorry for not providing all required information. Magento's integration test framework offers a way to create data fixtures with the How to reproduceAdd an integration test to your own test suite that uses a data fixture with an invalid config. For example:
If you'll run the test now, you'll see that an error appears, because the |
Yes, this is another issue that happens in the 2.4-develop branch. This line is responsible for the error: magento2/dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php Line 115 in 9c48c55
In the 2.4-develop branch phpunit was upgraded to v10.5, where the So there's another bug in the test framework. The error is not triggered by my PR ;-) |
I have added a new issue for the error you have mentioned, @engcom-Hotel. But to proceed with this issue, can you add a breakpoint to this line, during execution of the test. Then you should see the |
Thanks @stollr for the information! We have tried to reproduce the issue by adding the breakpoint mentioned in the above comment and we are able to reproduce the issue. Please refer to the below error we are getting:
Hence confirming the issue. Thanks for the contribution. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13503 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
This issue is automatically created based on existing pull request: #39423: Added null check in DataFixtureSetup for the scope
Description (*)
The scope defined in a data fixture could be an arbitrary string. If there is no corresponding value in the storage manager null is returned.
In this case null is passed to the scope switcher which leads to a
TypeError
, because it requires an object of typeScopeInterface
.The
TypeError
is now prevented by throwing aRuntimeException
with a more specific message.Contribution checklist (*)
The text was updated successfully, but these errors were encountered: