Skip to content

test(TestCase): restore unregistered services correctly#62326

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-fix-TestCase-restoreService
Open

test(TestCase): restore unregistered services correctly#62326
joshtrichards wants to merge 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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants