Skip to content

test: replace addToAssertionCount checkbox tests in Hooks and DI#60749

Open
miaulalala wants to merge 1 commit into
masterfrom
fix/noid/checkbox-tests-hooks-di
Open

test: replace addToAssertionCount checkbox tests in Hooks and DI#60749
miaulalala wants to merge 1 commit into
masterfrom
fix/noid/checkbox-tests-hooks-di

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

@miaulalala miaulalala commented May 26, 2026

Summary

  • BasicEmitterTest: add #[DoesNotPerformAssertions] to 5 tests that verify no exception is thrown after listener removal; remove unreachable addToAssertionCount(1) from 4 tests that already have expectException
  • FunctionInjectorTest: add #[DoesNotPerformAssertions] to 2 tests verifying no-exception behaviour; remove unreachable placeholder from testInjectFnByType (factory closure assertion on line 47 is the real assertion)

Part of a broader effort to eliminate checkbox tests and replace them with proper PHPUnit 11 semantics.

Test plan

  • Run NOCOVERAGE=1 ./autotest.sh sqlite tests/lib/Hooks/BasicEmitterTest.php
  • Run NOCOVERAGE=1 ./autotest.sh sqlite tests/lib/AppFramework/Bootstrap/FunctionInjectorTest.php
  • Confirm no risky test warnings in CI

🤖 Generated with Claude Code

…ssertions in Hooks and DI tests

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@miaulalala miaulalala force-pushed the fix/noid/checkbox-tests-hooks-di branch from c47064b to dff8151 Compare May 26, 2026 21:19
@miaulalala miaulalala changed the title fix(tests): replace addToAssertionCount checkbox tests in Hooks and DI test: replace addToAssertionCount checkbox tests in Hooks and DI May 26, 2026
@miaulalala miaulalala self-assigned this May 26, 2026
@miaulalala miaulalala added 2. developing Work in progress tests Related to tests CI labels May 26, 2026
@miaulalala miaulalala added this to the Nextcloud 35 milestone May 26, 2026
@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable34

@miaulalala miaulalala marked this pull request as ready for review May 27, 2026 16:32
@miaulalala miaulalala requested a review from a team as a code owner May 27, 2026 16:32
@miaulalala miaulalala requested review from Altahrim, artonge, leftybournes and salmart-dev and removed request for a team May 27, 2026 16:32
@miaulalala miaulalala enabled auto-merge May 27, 2026 17:48
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