Repository navigation
[3.0] Gives the existing tests the license header and the agreed docblocks - #9756
Merged
live627 merged 2 commits intoOct 8, 2026
Merged
Conversation
Every PHP file under tests/ other than the index.php stubs now opens with the same license header as Sources/, as AGENTS.md asks. The header is copied byte for byte from Sources/Sapi.php. check-smf-license.php skips ./tests/, so nothing checked this before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Each test method now has the docblock AGENTS.md describes: a summary, Expected: with the call and the result its assertions check, and for a regression test, Guards: with what went wrong, a @link to the commit that introduced the bug and a @link to the issue or pull request that fixed it. The Introduced by line is left out where the faulty code is older than the history (it is already in the 2012 import) or where the commit could not be confirmed from its diff. A comment at the top of a test body that explained why the test exists has moved into the docblock; nothing else in the bodies has changed. ThemeCopyTest is left alone, because SimpleMachines#9728 rewrites it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The follow-up promised in #9754: the existing tests now follow the conventions
AGENTS.mddescribes. It touches comments only. No test code or assertion changes.1. License header (
f5766871b, 74 files). Every PHP file undertests/other than theindex.phpstubs opens with the same header asSources/. It is copied byte for byte fromSources/Sapi.php.check-smf-license.phpskips./tests/, so nothing checked this before.2. Test method docblocks (
6a3bf799d, 57 files, about 280 methods). Every test method has the docblock from Test method docblocks:Expected:with the call and the result its assertions check;Guards:with what went wrong, plus@linklines to the commit that introduced the bug and to the issue or pull request that fixed it.A comment at the top of a test body that explained why the test exists has moved into the docblock. Every other comment in the bodies is untouched.
36 regression tests carry an
Introduced bylink. The line is left out where the faulty code is already in the 2012 import, or where the introducing commit could not be confirmed from its diff, asAGENTS.mdasks. A missing line can be added later, but a wrong one would mislead.ThemeCopyTestis not included, because #9728 rewrites it and already gives its tests docblocks in this shape.How it was checked
php -w) is identical before and after.public function test*()intests/has a docblock withExpected:, apart from the three inThemeCopyTest.Introduced bylinks names an existing commit, and its quoted subject matchesgit log -1 --format=%sexactly.Url::proxied()→1c9e53bf7: it first passed the bracketed host tofilter_var().8b7ef30ce: it addedstrict_typesand the typed signatures.TimeTest→7bc3a536c: it began readingUser::$medirectly.ReplyNotificationTest→147061675: the frequency values were already 0 none, 1 every reply, 2 first unread.Found 0 of 57 files that can be fixed.release-3.0. The integration files passphp -l. Since only comments changed, the integration and HTTP suites were not rerun.The docblocks were drafted by several agents working through the files in parallel from one written brief. Everything above was then checked over the whole set. The
Introduced bylinks are the part most worth a reviewer's glance.Conflicts to expect
The header commit touches files that open pull requests also change:
GuestPagesTest(#9739),HttpTestCase(#9712, #9727), andThemeCopyListTest(#9728). The conflicts are small, and whichever lands second needs a rebase.Issues References (Fixes|Related|Closes)
Related: #9754
🤖 Generated with Claude Code