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

IBX-1809: Allowed override of test Kernel via environment #275

Merged
merged 3 commits into from
Dec 29, 2021

Conversation

Steveb-p
Copy link
Contributor

@Steveb-p Steveb-p commented Dec 29, 2021

Question Answer
JIRA issue IBX-1809
Type improvement
Target Ibexa version v3.3
BC breaks no

This PR allows developers to change the base Kernel class used in their tests without adding the getKernelClass() method.
In practice this allows exposition & re-use of any abstract test classes without creating intermediary classes just to overwrite the Kernel class, or overwriting the method in all descendants.

Additionally, methods to switch user context are added, because they repeat in every package that needs to take user into account.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/engineering-team).

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Steveb-p Steveb-p requested review from alongosz and a team December 29, 2021 11:29
@alongosz alongosz requested a review from a team December 29, 2021 11:31
@adamwojs adamwojs merged commit fdcb00d into 1.3 Dec 29, 2021
@adamwojs adamwojs deleted the ibx-1809-allow-kernel-class-override branch December 29, 2021 12:23
@Steveb-p
Copy link
Contributor Author

Merged up into ibexa/core in ibexa/core@47c6816

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants