agentleFS
TheBeardedBearSASTheBeardedBearSAS/claude-craft/.claude/skills/testing-symfony/SKILL.md

testing-symfony

Skill108 starsChanged 5 days agoMITView on GitHub

Stratégie de Tests Symfony 8.1 / PHP 8.5. Use when writing tests, reviewing test coverage, or setting up testing.

The file

Files
SKILL.md

Stratégie de Tests Symfony 8.1 / PHP 8.5

Versions : Symfony 8.1+ | PHP 8.5 | Pest 5 | PHPUnit 13 | Playwright

Pest 5 (PHP 8.4+, PHPUnit 13) intègre nativement le test navigateur (Playwright) : plus besoin de Panther pour l'E2E. Behat (4.x, maintenu) reste pertinent pour le BDD Gherkin ; sinon préférer des tests Pest descriptifs.

Stack recommandée 2026

TypeOutilUsage
Unit/IntegrationPest 5 (PHPUnit 13, PHP 8.4+, arch tests)Tests backend Symfony
Browser/E2EPest 5 Browser Testing (Playwright natif)Tests frontend intégrés
MutationInfectionQualité des tests (MSI >= 80%)
Static AnalysisPHPStan Level 10Vérification statique

Sources : Pest 5 Upgrade Guide, Infection

Invariants non-négociables

  • Couverture >= 80% (line + branch)
  • Mutation Score Indicator (MSI) >= 80% via Infection
  • PHPStan Level 10 — aucun mixed non justifié
  • Arch tests : domain indépendant de l'infrastructure
  • Fixtures via doctrine/data-fixtures — pas de données hard-codées
  • Pattern AAA (Arrange-Act-Assert) dans chaque test
  • Tests browser dans tests/Browser/, unit dans tests/Unit/, feature dans tests/Feature/

Checklist par type

TypeVérification
UnitIsolation totale, pas de DB, mocks Prophecy/Mockery
IntegrationKernelTestCase, fixtures chargées, DB de test
BrowserPlaywright natif Pest 5, assertions sur l'UI réelle
Archpest()->arch() — namespaces, dépendances, interdictions
Mutationvendor/bin/infection --threads=4, MSI >= 80

Détails complets, exemples de code, configs et checklists : voir REFERENCE.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.