fix: check each target in negated toUse (#1933)

* fix: check each target in negated toUse

A skipped class in expect([...]) made the positive rule fail,
so the negation passed even when another class used the dependency.

Fixes #1751

* test: update snapshots for notToUse

Negated toUse coverage adds 6 tests and 24 assertions,
so the success snapshot and parallel totals were stale.

---------

Co-authored-by: Tiago Santos <tsantos@lynixt.pt>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
Tiago Santos
2026-11-14 10:43:29 +00:00
committed by GitHub
parent 9aed110ba0
commit a6b81dbd73
9 changed files with 108 additions and 5 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ test('parallel', function () use ($run): void {
$output = $run('--exclude-group=integration');
$output = implode("\n", array_slice(explode("\n", (string) $output), -10));
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 29 skipped, 1630 passed (3599 assertions)';
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 29 skipped, 1636 passed (3623 assertions)';
expect($output)
->toContain("Tests: {$expected}")