dev-toolings/superpowers-symfony107 installs
tdd-with-phpunit
Apply RED-GREEN-REFACTOR with PHPUnit 10/11 for Symfony; KernelTestCase/WebTestCase, attributes (#[Test]/#[DataProvider]), Foundry
How do I install this agent skill?
npx skills add https://github.com/dev-toolings/superpowers-symfony --skill tdd-with-phpunitIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides standard guidelines for Test-Driven Development (TDD) using PHPUnit and Symfony. It is safe for its intended use, though it inherently possesses an indirect prompt injection surface due to its requirement to read and process external codebase files.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Tdd With Phpunit (Symfony)
Use when
- Driving a feature with RED-GREEN-REFACTOR using PHPUnit 10/11 class-based tests.
- Choosing between
TestCase,KernelTestCaseandWebTestCasefor a new behavior. - Testing a console command, or an invalid form that must answer 422.
- Swapping an external service for a double through the test container.
Default workflow
- RED: pick the base class, write the test with
#[Test],#[DataProvider]and#[CoversClass], run it and check it fails for the right reason. - GREEN: write the minimum code that passes.
- REFACTOR with the suite green, re-running it after each change.
- Replace an external boundary with
static::getContainer()->set(Service::class, $mock). - Test commands with
CommandTester, or withrunCommand()andassertCommandIsSuccessful()on Symfony 8.1+. - Assert invalid form submissions with
assertResponseIsUnprocessable().
Guardrails
- Use PHPUnit 10+ attributes, not
@testor@dataProviderannotations. - Fetch services with
static::getContainer(), not the legacyself::$container. - Mock only true external boundaries (HTTP clients, third-party SDKs); keep real services and a real database elsewhere.
runCommand()and closures ingetContainer()->set()need Symfony 8.1+.
Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
Output contract
- The failing PHPUnit output (RED), then the passing run.
- Test files changed, with the base class and attributes used.
- Commands executed.
References
reference.md
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/dev-toolings/superpowers-symfony/tdd-with-phpunit">View tdd-with-phpunit on skillZs</a>