Adopt Boost testing skill - #452
Conversation
Require Boost 2.6 so Core can use its latest agent guidance. Publish the testing best-practices skill for package development.
There was a problem hiding this comment.
馃挕 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7cb799ddd2
鈩癸笍 About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 馃憤.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ->toContain('<script>') | ||
| ->not->toContain("<script>alert('xss')</script>"); |
There was a problem hiding this comment.
Reject raw script tags in the escaping example
For correctly escaped HTML, the output contains <script>, not a literal <script> tag, so this expectation fails for the secure behavior and explicitly requires dangerous markup to survive rendering. An agent following this example could weaken the template or write a security test that accepts partially unescaped output; assert that the raw opening tag is absent and separately verify the safely rendered content.
Useful? React with 馃憤聽/ 馃憥.
|
|
||
| Use a PHPUnit assertion only if no Pest expectation and no Laravel assertion exists for the subject. | ||
|
|
||
| Assert each fact once. Do not assert a 200 status before `assertSee`, because `assertSee` already shows that the page rendered. |
There was a problem hiding this comment.
Keep the success-status assertion before assertSee
When an endpoint returns an error response whose body still contains the expected text, assertSee() passes because it only searches the response content; it does not verify a 200 status or prove that the page rendered successfully. Following this instruction therefore leaves HTTP tests unable to detect status regressions, so successful-page tests should retain assertOk() or assertSuccessful() alongside the content assertion.
Useful? React with 馃憤聽/ 馃憥.
Summary
testing-best-practicesagent skill and rule setTesting
composer validate --strictcomposer test:lint