Skip to content

test(core): restore CLI state and correct assertion in SetupTest - #62772

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-fix-Setup-testFindRootCli-state
Open

test(core): restore CLI state and correct assertion in SetupTest#62772
joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-fix-Setup-testFindRootCli-state

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

🔀 Review triage: ⚠️ Risk: Low · ⏱️ Effort: Quick

Summary

Ensure testFindWebRootCli() restores \OC::$CLI even when an unexpected exception occurs, and correct the PHPUnit assertion argument order.

No production code changes.

Related production code: Setup::findWebRoot()

Testing

Existing testFindWebRootCli() data-provider coverage is unchanged.

Checklist

  • Code is properly formatted
  • Sign-off message is included
  • Tests are included
  • Documentation is not required
  • Backport is not required
  • Labels added
  • Milestone added

AI disclosure

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

testFindWebRootCli() can leak it's temporarily overridden `\OC::$CLI` if an unexpected exception occurs.

Also expected/actual arguments on the assert are reversed.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Aug 2, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner August 2, 2026 13:49
@joshtrichards
joshtrichards requested review from Altahrim, icewind1991 and salmart-dev and removed request for a team August 2, 2026 13:49
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Aug 2, 2026
@joshtrichards joshtrichards added feature: install and update tests Related to tests ⚠️ risk: low Unlikely to cause meaningful regressions; limited runtime or compatibility impact. ⏱️ review-effort: quick Can usually be reviewed from the diff and nearby context; targeted validation may be sufficient. labels Aug 2, 2026
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 feature: install and update ⏱️ review-effort: quick Can usually be reviewed from the diff and nearby context; targeted validation may be sufficient. ⚠️ risk: low Unlikely to cause meaningful regressions; limited runtime or compatibility impact. tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant