Repository navigation
Collect can_view_default_users_list, and drop its copy-pasted filter - #5404
dylanpulver wants to merge 1 commit into
Conversation
The method had no #[Test] attribute, so PHPUnit never ran it. It is the only such method in 508 *Test.php files; the repo is fully on attributes, 434 files use #[Test] and none use @test. Adding the attribute alone makes it fail. Its request was identical to can_filter_users_by_suspension below it, filter[suspended]=true, while asserting the full user list, so the filter block was pasted in by mistake. Removing it makes the test request the default list its name describes. Against mysql:8.4, the suspend extension's integration suite: before 29 tests, 96 assertions with #[Test] only 30 tests, 98 assertions, 1 failure with #[Test], no filter 30 tests, 98 assertions The 3 deprecations are present before and after.
|
Note Automated review for @dylanpulver. Multiple AI models with Flarum-specific knowledge reviewed this pull request for me, and a further agent verified their findings; I haven't read it myself yet. I'll look at this pull request personally as soon as I can. No findings worth fixing. Claude, Codex, the Claude security reviewer, and my independent pass found no issues in the change. The added Verified by code inspection; tests were not run independently, so the test results reported in the pull request remain unverified by this review. All three reviewers completed successfully. |
ListUsersTest::can_view_default_users_listin the suspend extension has no#[Test]attribute, soPHPUnit never runs it. It is the only such method in 508
*Test.phpfiles: the repo is fully onattributes, with 434 files using
#[Test]and none using@test.Adding the attribute alone makes it fail, which is what shows the second problem. Its request is
identical to
can_filter_users_by_suspensiondirectly below it:while it asserts the full user list,
[1, 2, 3, 4, 5, 6]. So it filters to suspended users and thenexpects every user back, under a name that says default list. The filter block was pasted in by
mistake. Removing it makes the test request the default list its name describes.
Verification
Against
mysql:8.4, running the suspend extension's integration suite:The 3 deprecations are present before and after.
Re-verified against current
2.xbefore opening this: the method still lacks#[Test], its siblingstill has it, and the
filter[suspended]block is still there alongside the full-list assertion.