
functional-tests
Write functional tests for Symfony controllers and HTTP endpoints using WebTestCase, getContainer, loginUser, and DAMA rollback
- Installs
- 95
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/dev-toolings/superpowers-symfony --skill functional-tests- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads functional-tests automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Functional Tests (Symfony)
Use when
- A controller or HTTP endpoint must be checked through the kernel: status, redirect, rendered DOM, form errors, emails.
- A repository or service must be tested against the real database with
KernelTestCase. - An authenticated or role-restricted route needs coverage via
loginUser(). - Key URLs need cheap smoke tests.
Default workflow
- Choose the base class:
WebTestCasefor HTTP,KernelTestCasefor services, plainTestCasefor pure logic. - Call
static::createClient()directly (neverbootKernel()first) and read private services withstatic::getContainer(). - Authenticate with
$client->loginUser($user)instead of replaying the login form. - Assert the response and the DOM:
assertResponseIsSuccessful(),assertResponseRedirects(),assertSelectorTextContains(),assertEmailCount(). - Isolate tests with the DAMADoctrineTestBundle
PHPUnitExtension, plus Foundry reset for fixtures. - Add smoke tests with a data provider and hardcoded URLs.
Guardrails
- Use the real database and real repositories; do not mock the EntityManager or repositories in data-touching tests.
- Invalid form submissions assert 422 with
assertResponseIsUnprocessable()(Symfony 8.0+ behavior). .env.localis not loaded in the test environment: use.env.testor.env.test.local.assertSessionHasFlashMessage()requires Symfony 8.1+.
Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
Output contract
- Test classes with the base class chosen for each.
- The authentication and database isolation strategy.
- Status codes, DOM assertions and smoke URLs covered.
References
reference.md
FAQ
What does the functional-tests skill do?
Write functional tests for Symfony controllers and HTTP endpoints using WebTestCase, getContainer, loginUser, and DAMA rollback
How do I install functional-tests?
Run npx skills add https://github.com/dev-toolings/superpowers-symfony --skill functional-tests in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/functional-tests/ (personal) or .claude/skills/functional-tests/ (project).
Which AI agents can use functional-tests?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is functional-tests safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains functional-tests?
It is published by dev-toolings in dev-toolings/superpowers-symfony. It has 95 recorded installs.
More from dev-toolings/superpowers-symfony
symfony:interfaces-and-autowiring
dev-toolings/superpowers-symfony
Master Symfony Dependency Injection with autowiring,
symfony:controller-cleanup
dev-toolings/superpowers-symfony
Refactor fat controllers into lean ones by extracting business logic to services, handlers, and invokable commands
symfony:doctrine-migrations
dev-toolings/superpowers-symfony
Create and manage Doctrine migrations (lib 4.x) for schema versioning; handle dependencies, rollbacks, and production deployment
symfony:tdd-with-phpunit
dev-toolings/superpowers-symfony
Apply RED-GREEN-REFACTOR with PHPUnit 10/11 for Symfony; KernelTestCase/WebTestCase, attributes ([Test]/[DataProvider]), Foundry
symfony:quality-checks
dev-toolings/superpowers-symfony
Run code quality tools: PHP-CS-Fixer for style, PHPStan for static analysis, and type safety checks
symfony:doctrine-relations
dev-toolings/superpowers-symfony
Define Doctrine entity relationships (OneToMany, ManyToMany, ManyToOne); configure cascade, orphan removal, multiple entity managers; prevent N+1 queries
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work