MCPInstall

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
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads functional-tests automatically when relevant.

  3. 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

  1. Choose the base class: WebTestCase for HTTP, KernelTestCase for services, plain TestCase for pure logic.
  2. Call static::createClient() directly (never bootKernel() first) and read private services with static::getContainer().
  3. Authenticate with $client->loginUser($user) instead of replaying the login form.
  4. Assert the response and the DOM: assertResponseIsSuccessful(), assertResponseRedirects(), assertSelectorTextContains(), assertEmailCount().
  5. Isolate tests with the DAMADoctrineTestBundle PHPUnitExtension, plus Foundry reset for fixtures.
  6. 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.local is not loaded in the test environment: use .env.test or .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

View all →

symfony:interfaces-and-autowiring

dev-toolings/superpowers-symfony

Master Symfony Dependency Injection with autowiring,

Security708 installs

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

DevOps & Cloud641 installs

symfony:tdd-with-phpunit

dev-toolings/superpowers-symfony

Apply RED-GREEN-REFACTOR with PHPUnit 10/11 for Symfony; KernelTestCase/WebTestCase, attributes ([Test]/[DataProvider]), Foundry

Testing & QA634 installs

symfony:quality-checks

dev-toolings/superpowers-symfony

Run code quality tools: PHP-CS-Fixer for style, PHPStan for static analysis, and type safety checks

Backend & APIs622 installs

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

612 installs

Popular testing & qa skills

View category →

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.

Testing & QA1.2M installs

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.

Testing & QA996.2K installs

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.

Testing & QA484.1K installs

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.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs