Skip to main content
Manusで任意のスキルを実行
ワンクリックで

write-phpunit-test

スター4
フォーク0
更新日2026年5月17日 16:56

Writes a PHPUnit 10 test in <slug>/tests/<Class>Test.php for SugarCraft monorepo libs. Use when the user says 'add test', 'write a phpunit test', 'cover <Class>', 'test this method', or modifies files under <slug>/src/. Produces snapshot tests for renderers (asserting raw \x1b[…m SGR bytes), behaviour tests for state machines (driving update() with scripted KeyMsg/MouseMsg/Tick), coercion tests for fluent setters (clamped/no-op on bad input), and immutability checks for with*() builders. Uses namespace SugarCraft\<Sub>\Tests, final class extending PHPUnit\Framework\TestCase, runs via vendor/bin/phpunit from the lib root. Do NOT use for integration tests, CI workflow files, JS/frontend tests, or non-PHPUnit testing frameworks.

インストール

Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。

SKILL.md
readonly