Skip to content
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

Fail gracefully if EM could not be constructed in tests #10008

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

derrabus
Copy link
Member

Our functional test hooks into test failures. Here, the method isQueryLogAvailable() is called which assumes that the entity manager had been constructed by the setUp method. However, if constructing the EM fails (for whatever reason) or the test fails even earlier, we will run into a null pointer here and we won't see the actual test failure. This PR fixes that problem.

@derrabus derrabus added this to the 2.13.2 milestone Aug 26, 2022
@derrabus derrabus merged commit 0ecac1b into doctrine:2.13.x Aug 30, 2022
@derrabus derrabus deleted the bugfix/no-em branch August 30, 2022 11:40
derrabus added a commit that referenced this pull request Aug 30, 2022
* 2.13.x:
  Bump Ubuntu version and shared workflows (#10020)
  Fail gracefully if EM could not be constructed in tests (#10008)
derrabus added a commit to derrabus/orm that referenced this pull request Aug 30, 2022
* 2.14.x:
  Bump Ubuntu version and shared workflows (doctrine#10020)
  Make paginator covariant (doctrine#10002)
  Fail gracefully if EM could not be constructed in tests (doctrine#10008)
derrabus added a commit that referenced this pull request Aug 30, 2022
* 2.14.x:
  Bump Ubuntu version and shared workflows (#10020)
  Make paginator covariant (#10002)
  Fail gracefully if EM could not be constructed in tests (#10008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants