Skip to content

test(TestCase): restore unregistered services correctly - #62326

Merged
come-nc merged 1 commit into
masterfrom
jtr/test-fix-TestCase-restoreService
Aug 3, 2026
Merged

test(TestCase): restore unregistered services correctly#62326
come-nc merged 1 commit into
masterfrom
jtr/test-fix-TestCase-restoreService

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Fix Test\TestCase::restoreService() to remove a temporary DI-container registration when the service did not exist before overwriteService() was called.

Previously, restoration attempted to unset the saved service value (false) instead of the service name, leaving the test override registered and potentially leaking it into subsequent tests.

Related/introduced in #53523

Possible follow-up: May be worth adding test coverage for more for of our test infrastructure; particularly this base class. Leaving out of scope since that deserves its own PR.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Jul 19, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner July 19, 2026 14:37
@joshtrichards joshtrichards added 3. to review Waiting for reviews tests Related to tests developer experience labels Jul 19, 2026
@joshtrichards
joshtrichards requested review from Altahrim, come-nc, icewind1991, leftybournes and salmart-dev and removed request for a team July 19, 2026 14:37
@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable34

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable33

@come-nc
come-nc merged commit 6dbed4c into master Aug 3, 2026
257 of 270 checks passed
@come-nc
come-nc deleted the jtr/test-fix-TestCase-restoreService branch August 3, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews developer experience tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants