mcpField
T
testing-symfony

testing-symfony

github.com/thebeardedbearsasTesting & quality107205 installsUpdated today
Repository

About testing-symfony

A Symfony testing strategy skill for teams working with Symfony and PHP. It organizes backend, browser, mutation, and static-analysis testing around Pest, PHPUnit, Playwright, Infection, and PHPStan.

Key features

  1. 01Pest unit and integration testing
  2. 02Pest browser testing with Playwright
  3. 03Infection mutation testing
  4. 04PHPStan Level 10 static analysis
  5. 05Test structure and coverage requirements

Use cases

  1. 01Plan Symfony backend test suites
  2. 02Add browser-based end-to-end tests
  3. 03Measure test quality with mutation testing
  4. 04Enforce architecture and static-analysis rules

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thebeardedbearsas/claude-craft --skill testing-symfony

After installing, type/testing-symfonyin Claude Code to confirm it loaded.

Bundled filesREFERENCE.md

Details

From the project README

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

Comments

Markdown supported