[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DW10TKHDRR5BFBQNSWNN4C":3,"skill-same:01M6DW10TKHDRR5BFBQNSWNN4C":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6DW10TKHDRR5BFBQNSWNN4C","symfony-test-conventions",null,"ACTIVATE when writing or modifying a test that boots Symfony — WebTestCase, KernelTestCase, TypeTestCase, functional\u002Finterface tests, FormType tests, or container service doubles. ACTIVATE for 'crawler', 'assertSelectorTextContains', 'assertResponseRedirects', 'assertSelectorExists', 'followRedirect', 'disableReboot', 'getContainer() set', 'TypeTestCase', 'functional test', 'test fonctionnel', 'test d'interface'. Covers: which base class to pick, built-in WebTestCase assertions over hand-rolled crawler reads, one-dataset-one-test for HTML pages, full-JSON assertion for API endpoints, FormType testing, and container-double traps. DO NOT use for: PHPUnit\u002FProphecy patterns independent of Symfony — doubles, data providers, test naming, factories (see phpunit:php-test-conventions), TDD workflow (see phpunit:php-tdd-workflow), FormType design itself (see symfony:symfony-form).","FabienSalles\u002Fclaude-marketplace","FabienSalles","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F937901?v=4","01M6DVJBD31CJKRB382FQFZ5FH","Fabien Salles","01M6DVJBQNY8Q18KJD1ESAD6TX",9,"MIT","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fsymfony\u002Fskills\u002Fsymfony-test-conventions\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"symfony test conventions","test","conventions","use","dataset","pages","tests","do","activate","endpoints","container","testing","pick","json","api","SET","workflow","tdd","writing","design","2026-11-10 10:12:30",false,"---\nname: symfony-test-conventions\ndescription: \"ACTIVATE when writing or modifying a test that boots Symfony — WebTestCase, KernelTestCase, TypeTestCase, functional\u002Finterface tests, FormType tests, or container service doubles. ACTIVATE for 'crawler', 'assertSelectorTextContains', 'assertResponseRedirects', 'assertSelectorExists', 'followRedirect', 'disableReboot', 'getContainer() set', 'TypeTestCase', 'functional test', 'test fonctionnel', 'test d'interface'. Covers: which base class to pick, built-in WebTestCase assertions over hand-rolled crawler reads, one-dataset-one-test for HTML pages, full-JSON assertion for API endpoints, FormType testing, and container-double traps. DO NOT use for: PHPUnit\u002FProphecy patterns independent of Symfony — doubles, data providers, test naming, factories (see phpunit:php-test-conventions), TDD workflow (see phpunit:php-tdd-workflow), FormType design itself (see symfony:symfony-form).\"\n---\n\n# Test Conventions — Symfony\n\nEverything here needs a **Symfony base class or the container**. The framework-agnostic\nPHPUnit discipline — test doubles, Prophecy, data providers, naming, factories, assertion\npatterns — lives in `phpunit:php-test-conventions`, and the cross-language principles (DAMP,\nAAA, spy over mock, what NOT to test) in `craft:testing-principles`. Load this one *alongside*\nthem, not instead.\n\n## Picking a base class\n\n| Test type | Base class | Purpose |\n|---|---|---|\n| Unit | `TestCase` | No container, pure logic — no Symfony needed |\n| Unit FormType | `TypeTestCase` | FormType in isolation |\n| Integration | `KernelTestCase` | Needs container services |\n| Functional \u002F Acceptance | `WebTestCase` | HTTP request\u002Fresponse, E2E scenarios |\n\nPick the **cheapest** one that exercises the behaviour. Booting a kernel to observe a pure\nfunction is the most common overspend — a transformation from a projection to form data is a\n`TestCase`, even though both types come from a Symfony-shaped layer.\n\n> FormType testing details: [references\u002Fformtype-testing.md](references\u002Fformtype-testing.md).\n\n## Where a form rule's assertion lives\n\nThe table above says what boots; this one says **which test owns which assertion**. The\ngoverning principle is `craft:testing-principles` §14 — the level where the business intent\nreads best; the deciding class is the last resort when no higher level stays legible.\n\n| The rule | Its test |\n|---|---|\n| an option \u002F constraint of the form type | `TypeTestCase` on the **real** type that carries it — never a test-only concrete subclass |\n| which business context sets the option | unit test of the orchestrator (strategy \u002F handler): `prophesize` the `FormFactoryInterface`, assert the options passed to `create()` with `Argument::withEntry(...)` |\n| the full chain | **one** `WebTestCase` path per observable effect — the request reaches (or not) the port, the field carries the error |\n\nThe placement smell: **re-reading through the crawler a list a lower level owns** (`\u003Coption>`\nextraction, select states). That assertion scrapes a consequence instead of naming the rule —\nkeep the crawler for what only the rendered page can show.\n\n## What NOT to test: FormType structure\n\nThe `craft:testing-principles` rule \"don't re-verify what a higher-level test already covers\"\nhas a frequent FormType expression:\n\n```php\n\u002F\u002F ❌ Avoid — just re-states the FormType composition\npublic function transfersExposesCollectionAndAllocationsAtTopLevel(): void\n{\n    $form = $this->factory->create(PaymentForm::class, ...);\n    self::assertTrue($form->get('transfer')->has('collection'));\n    self::assertTrue($form->get('transfer')->has('allocations'));\n}\n```\n\nThe test `transfersCollectionAcceptsMultipleTransfersWithSingleAllocation` already fails if\neither sub-form is missing.\n\n**Common false-positives** to avoid:\n- Collection-empty tests when the business rule requires ≥ 1 (already caught by the clean-listener test).\n- \"Form exposes X\" tests that just re-state the FormType composition.\n- \"Field has type Y\" tests that just re-state the FormType configuration.\n\n## Interface (HTML) functional tests\n\n### Use the built-in assertions before the crawler\n\n`WebTestCase` ships a full assertion vocabulary. Nearly every hand-rolled crawler read has a\none-line equivalent that reads better **and** fails better — it names the selector and the\nexpectation in the failure message, and bundles the existence check you would otherwise\nforget.\n\n```php\n\u002F\u002F ❌ Hand-rolled — errors with \"The current node list is empty\" when absent,\n\u002F\u002F    and the trim() duplicates what the constraint already does\nself::assertSame('Déclaration enregistrée.', trim($crawler->filter('.alert-success')->text()));\n\n\u002F\u002F ✅ Built-in — asserts the selector exists AND the text matches\nself::assertSelectorTextContains('.alert-success', 'Déclaration enregistrée.');\n```\n\nThe full catalogue — response\u002Frouting, content, form state, mail — is in\n[references\u002Finterface-assertions.md](references\u002Finterface-assertions.md). Keep the crawler\nonly for assertions **scoped to a sub-tree** (`$rows->eq(2)`), since the built-ins always\nquery the whole document.\n\n### One rendered dataset = one success test method\n\nA single GET renders one page; assert everything about that page (rows, chips, links, fields,\ndata islands, absence of orphan translation keys) inside **one** `@test` method reusing a\nsingle crawler.\n\nDo **not** fragment one rendered response into many tiny `@test` methods that each re-issue\nthe same request and assert one thing — it multiplies HTTP round-trips, hides that they share\na dataset, and reads as many features when it is one.\n\n```php\n\u002F\u002F ❌ Avoid — one request re-issued per assertion, one @test each\npublic function rendersAtLeastTwoRows(): void { \u002F* request + 1 assert *\u002F }\npublic function rendersExactlyOneChip(): void { \u002F* same request + 1 assert *\u002F }\npublic function rendersOneEditLinkPerRow(): void { \u002F* same request + 1 assert *\u002F }\n\n\u002F\u002F ✅ Prefer — one dataset, one success test, one crawler, grouped assertions\n\u002F** @test *\u002F\npublic function displaysTheAccountsList(): void\n{\n    $this->logInAsCgp();\n\n    $crawler = $this->client->request('GET', self::URL);\n\n    self::assertResponseIsSuccessful();\n    $rows = $crawler->filter('.account-row');\n    self::assertGreaterThanOrEqual(2, $rows->count());\n    self::assertSelectorCount(1, '.default-badge');\n    self::assertSame($rows->count(), $crawler->filter('.edit-link')->count());\n    \u002F\u002F …the rest of the page's contract, same crawler…\n}\n```\n\n**Multiple datasets → multiple tests is correct.** Split by *scenario\u002Fstate* (empty list vs\npopulated, role A vs role B, feature flag on\u002Foff), not by *assertion*. Each distinct rendered\nstate gets its own success test; a `@dataProvider` is fine when the states are parametric.\n\n### Assert the content the user sees, not the wiring\n\nA functional test proves *behaviour*: the expected names, amounts, labels, field values,\nselected\u002Fdisabled state actually render. Selectors are only there to **locate** an element —\nasserting presence or counts by class alone tests plumbing, and passes even when every row\nshows the wrong data.\n\n```php\n\u002F\u002F ❌ Technical — passes even if the row renders garbage\nself::assertSelectorCount(1, '.default-badge');\n\n\u002F\u002F ✅ Functional — the right account is flagged default, pre-selected, with its IBAN\n$default = $crawler->filter('.account-row')->eq(0);\nself::assertStringContainsString('M. Jean Dupont', $default->text());\nself::assertStringContainsString('IBAN : FR76…3456 - Banque Populaire', $default->text());\nself::assertStringContainsString('Compte par défaut', $default->text());\nself::assertCheckboxChecked('payment_information[account_ownership]');\n```\n\nPresence\u002Fcount-by-class is acceptable only as a secondary invariant next to content\nassertions (\"exactly one default badge on the page\"), never as the whole test.\n\n### Locate via markup production already emits\n\nNever add a hook for the test (see `craft:testing-principles` §12). Do not add a `js-*` class,\n`id`, or attribute to a template\u002FFormType *only* so the crawler can find the element. Locate by\nthe real field name (`input[name$=\"[account_ownership]\"]`), the visible label text, or an\naccessible role — `craft:testing-principles` §13 ranks these over volatile styling\u002Flayout\nclasses. A `js-*` selector is legitimate **only** when it is a real JS hook the feature already\nneeds; used purely as a test anchor it is production code serving the test, and must not exist.\n\nUse `$crawler->filter('.css-selector')` for class matching (requires `symfony\u002Fcss-selector`, a\n`require-dev` in any test-bearing project). It is the whole-token `.class` match — don't\nhand-roll `filterXPath('\u002F\u002F*[contains(@class, ...)]')`, whose naive substring also matches\n`card-header`\u002F`cards`.\n\nBusiness-rule traceability (Rn → assertion) lives in the spec\u002Fplan, not in per-rule test\nmethods. Keep the interface test DAMP: descriptive local variables, no per-assertion comments.\n\n## API (JSON) functional tests\n\nFor API functional tests (`WebTestCase`) with deterministic data (fixtures), **assert the full\nJSON response directly** with `assertJsonStringEqualsJsonString` and a JSON heredoc. Do not\ndecode the response to check individual properties.\n\n> Examples and when to use \u002F not use: [references\u002Fapi-json-testing.md](references\u002Fapi-json-testing.md).\n\n## Container doubles\n\nSubstitute a service with `self::getContainer()->set('alias', $double)`. Two traps, both of\nwhich produce failures that point nowhere near the cause:\n\n- **One `set()` per service per test.** A second call on the same alias throws *\"service is\n  already initialized, you cannot replace it\"*. When several tests need the same double,\n  install it from a single shared helper that takes the payload as a parameter.\n- **`KernelBrowser` reboots the kernel between requests**, discarding every double. A test\n  that submits and then calls `followRedirect()` re-issues the GET against the **real**\n  services and blows up somewhere unrelated. Call `$this->client->disableReboot()` before the\n  submission, in that test only.\n\nA service is only substitutable if it is **public in the test environment**. The usual shape\nis a `when@test` block republishing each private service under a `test.*` public alias:\n\n```yaml\nwhen@test:\n    services:\n        test.feature.get_fund_source:\n            alias: feature.get_fund_source\n            public: true\n```\n\nPrefer a plain hand-written double (public properties, no Prophecy) for these — see\n`phpunit:php-test-conventions` for the doubles hierarchy.\n\n## Quick reference\n\n| Situation | Approach |\n|---|---|\n| Pure function, no container | `TestCase` — don't boot a kernel |\n| Which test owns a form rule | Option → `TypeTestCase` on the real type; who sets it → orchestrator unit test (prophesized factory, `Argument::withEntry`); full chain → one `WebTestCase` per effect |\n| FormType in isolation | `TypeTestCase` — see [references\u002Fformtype-testing.md](references\u002Fformtype-testing.md) |\n| HTML page content, redirect, form state | Built-in assertions — see [references\u002Finterface-assertions.md](references\u002Finterface-assertions.md) |\n| API JSON response (deterministic) | `assertJsonStringEqualsJsonString` + heredoc — see [references\u002Fapi-json-testing.md](references\u002Fapi-json-testing.md) |\n| Replace a service | `getContainer()->set()` on a `test.*` public alias, once per test |\n| Follow a redirect with doubles installed | `$this->client->disableReboot()` first |\n| Doubles, Prophecy, data providers, naming | `phpunit:php-test-conventions` |\n","# Test Conventions — Symfony\n\nEverything here needs a **Symfony base class or the container**. The framework-agnostic\nPHPUnit discipline — test doubles, Prophecy, data providers, naming, factories, assertion\npatterns — lives in `phpunit:php-test-conventions`, and the cross-language principles (DAMP,\nAAA, spy over mock, what NOT to test) in `craft:testing-principles`. Load this one *alongside*\nthem, not instead.\n\n## Picking a base class\n\n| Test type | Base class | Purpose |\n|---|---|---|\n| Unit | `TestCase` | No container, pure logic — no Symfony needed |\n| Unit FormType | `TypeTestCase` | FormType in isolation |\n| Integration | `KernelTestCase` | Needs container services |\n| Functional \u002F Acceptance | `WebTestCase` | HTTP request\u002Fresponse, E2E scenarios |\n\nPick the **cheapest** one that exercises the behaviour. Booting a kernel to observe a pure\nfunction is the most common overspend — a transformation from a projection to form data is a\n`TestCase`, even though both types come from a Symfony-shaped layer.\n\n> FormType testing details: [references\u002Fformtype-testing.md](references\u002Fformtype-testing.md).\n\n## Where a form rule's assertion lives\n\nThe table above says what boots; this one says **which test owns which assertion**. The\ngoverning principle is `craft:testing-principles` §14 — the level where the business intent\nreads best; the deciding class is the last resort when no higher level stays legible.\n\n| The rule | Its test |\n|---|---|\n| an option \u002F constraint of the form type | `TypeTestCase` on the **real** type that carries it — never a test-only concrete subclass |\n| which business context sets the option | unit test of the orchestrator (strategy \u002F handler): `prophesize` the `FormFactoryInterface`, assert the options passed to `create()` with `Argument::withEntry(...)` |\n| the full chain | **one** `WebTestCase` path per observable effect — the request reaches (or not) the port, the field carries the error |\n\nThe placement smell: **re-reading through the crawler a list a lower level owns** (`\u003Coption>`\nextraction, select states). That assertion scrapes a consequence instead of naming the rule —\nkeep the crawler for what only the rendered page can show.\n\n## What NOT to test: FormType structure\n\nThe `craft:testing-principles` rule \"don't re-verify what a higher-level test already covers\"\nhas a frequent FormType expression:\n\n```php\n\u002F\u002F ❌ Avoid — just re-states the FormType composition\npublic function transfersExposesCollectionAndAllocationsAtTopLevel(): void\n{\n    $form = $this->factory->create(PaymentForm::class, ...);\n    self::assertTrue($form->get('transfer')->has('collection'));\n    self::assertTrue($form->get('transfer')->has('allocations'));\n}\n```\n\nThe test `transfersCollectionAcceptsMultipleTransfersWithSingleAllocation` already fails if\neither sub-form is missing.\n\n**Common false-positives** to avoid:\n- Collection-empty tests when the business rule requires ≥ 1 (already caught by the clean-listener test).\n- \"Form exposes X\" tests that just re-state the FormType composition.\n- \"Field has type Y\" tests that just re-state the FormType configuration.\n\n## Interface (HTML) functional tests\n\n### Use the built-in assertions before the crawler\n\n`WebTestCase` ships a full assertion vocabulary. Nearly every hand-rolled crawler read has a\none-line equivalent that reads better **and** fails better — it names the selector and the\nexpectation in the failure message, and bundles the existence check you would otherwise\nforget.\n\n```php\n\u002F\u002F ❌ Hand-rolled — errors with \"The current node list is empty\" when absent,\n\u002F\u002F    and the trim() duplicates what the constraint already does\nself::assertSame('Déclaration enregistrée.', trim($crawler->filter('.alert-success')->text()));\n\n\u002F\u002F ✅ Built-in — asserts the selector exists AND the text matches\nself::assertSelectorTextContains('.alert-success', 'Déclaration enregistrée.');\n```\n\nThe full catalogue — response\u002Frouting, content, form state, mail — is in\n[references\u002Finterface-assertions.md](references\u002Finterface-assertions.md). Keep the crawler\nonly for assertions **scoped to a sub-tree** (`$rows->eq(2)`), since the built-ins always\nquery the whole document.\n\n### One rendered dataset = one success test method\n\nA single GET renders one page; assert everything about that page (rows, chips, links, fields,\ndata islands, absence of orphan translation keys) inside **one** `@test` method reusing a\nsingle crawler.\n\nDo **not** fragment one rendered response into many tiny `@test` methods that each re-issue\nthe same request and assert one thing — it multiplies HTTP round-trips, hides that they share\na dataset, and reads as many features when it is one.\n\n```php\n\u002F\u002F ❌ Avoid — one request re-issued per assertion, one @test each\npublic function rendersAtLeastTwoRows(): void { \u002F* request + 1 assert *\u002F }\npublic function rendersExactlyOneChip(): void { \u002F* same request + 1 assert *\u002F }\npublic function rendersOneEditLinkPerRow(): void { \u002F* same request + 1 assert *\u002F }\n\n\u002F\u002F ✅ Prefer — one dataset, one success test, one crawler, grouped assertions\n\u002F** @test *\u002F\npublic function displaysTheAccountsList(): void\n{\n    $this->logInAsCgp();\n\n    $crawler = $this->client->request('GET', self::URL);\n\n    self::assertResponseIsSuccessful();\n    $rows = $crawler->filter('.account-row');\n    self::assertGreaterThanOrEqual(2, $rows->count());\n    self::assertSelectorCount(1, '.default-badge');\n    self::assertSame($rows->count(), $crawler->filter('.edit-link')->count());\n    \u002F\u002F …the rest of the page's contract, same crawler…\n}\n```\n\n**Multiple datasets → multiple tests is correct.** Split by *scenario\u002Fstate* (empty list vs\npopulated, role A vs role B, feature flag on\u002Foff), not by *assertion*. Each distinct rendered\nstate gets its own success test; a `@dataProvider` is fine when the states are parametric.\n\n### Assert the content the user sees, not the wiring\n\nA functional test proves *behaviour*: the expected names, amounts, labels, field values,\nselected\u002Fdisabled state actually render. Selectors are only there to **locate** an element —\nasserting presence or counts by class alone tests plumbing, and passes even when every row\nshows the wrong data.\n\n```php\n\u002F\u002F ❌ Technical — passes even if the row renders garbage\nself::assertSelectorCount(1, '.default-badge');\n\n\u002F\u002F ✅ Functional — the right account is flagged default, pre-selected, with its IBAN\n$default = $crawler->filter('.account-row')->eq(0);\nself::assertStringContainsString('M. Jean Dupont', $default->text());\nself::assertStringContainsString('IBAN : FR76…3456 - Banque Populaire', $default->text());\nself::assertStringContainsString('Compte par défaut', $default->text());\nself::assertCheckboxChecked('payment_information[account_ownership]');\n```\n\nPresence\u002Fcount-by-class is acceptable only as a secondary invariant next to content\nassertions (\"exactly one default badge on the page\"), never as the whole test.\n\n### Locate via markup production already emits\n\nNever add a hook for the test (see `craft:testing-principles` §12). Do not add a `js-*` class,\n`id`, or attribute to a template\u002FFormType *only* so the crawler can find the element. Locate by\nthe real field name (`input[name$=\"[account_ownership]\"]`), the visible label text, or an\naccessible role — `craft:testing-principles` §13 ranks these over volatile styling\u002Flayout\nclasses. A `js-*` selector is legitimate **only** when it is a real JS hook the feature already\nneeds; used purely as a test anchor it is production code serving the test, and must not exist.\n\nUse `$crawler->filter('.css-selector')` for class matching (requires `symfony\u002Fcss-selector`, a\n`require-dev` in any test-bearing project). It is the whole-token `.class` match — don't\nhand-roll `filterXPath('\u002F\u002F*[contains(@class, ...)]')`, whose naive substring also matches\n`card-header`\u002F`cards`.\n\nBusiness-rule traceability (Rn → assertion) lives in the spec\u002Fplan, not in per-rule test\nmethods. Keep the interface test DAMP: descriptive local variables, no per-assertion comments.\n\n## API (JSON) functional tests\n\nFor API functional tests (`WebTestCase`) with deterministic data (fixtures), **assert the full\nJSON response directly** with `assertJsonStringEqualsJsonString` and a JSON heredoc. Do not\ndecode the response to check individual properties.\n\n> Examples and when to use \u002F not use: [references\u002Fapi-json-testing.md](references\u002Fapi-json-testing.md).\n\n## Container doubles\n\nSubstitute a service with `self::getContainer()->set('alias', $double)`. Two traps, both of\nwhich produce failures that point nowhere near the cause:\n\n- **One `set()` per service per test.** A second call on the same alias throws *\"service is\n  already initialized, you cannot replace it\"*. When several tests need the same double,\n  install it from a single shared helper that takes the payload as a parameter.\n- **`KernelBrowser` reboots the kernel between requests**, discarding every double. A test\n  that submits and then calls `followRedirect()` re-issues the GET against the **real**\n  services and blows up somewhere unrelated. Call `$this->client->disableReboot()` before the\n  submission, in that test only.\n\nA service is only substitutable if it is **public in the test environment**. The usual shape\nis a `when@test` block republishing each private service under a `test.*` public alias:\n\n```yaml\nwhen@test:\n    services:\n        test.feature.get_fund_source:\n            alias: feature.get_fund_source\n            public: true\n```\n\nPrefer a plain hand-written double (public properties, no Prophecy) for these — see\n`phpunit:php-test-conventions` for the doubles hierarchy.\n\n## Quick reference\n\n| Situation | Approach |\n|---|---|\n| Pure function, no container | `TestCase` — don't boot a kernel |\n| Which test owns a form rule | Option → `TypeTestCase` on the real type; who sets it → orchestrator unit test (prophesized factory, `Argument::withEntry`); full chain → one `WebTestCase` per effect |\n| FormType in isolation | `TypeTestCase` — see [references\u002Fformtype-testing.md](references\u002Fformtype-testing.md) |\n| HTML page content, redirect, form state | Built-in assertions — see [references\u002Finterface-assertions.md](references\u002Finterface-assertions.md) |\n| API JSON response (deterministic) | `assertJsonStringEqualsJsonString` + heredoc — see [references\u002Fapi-json-testing.md](references\u002Fapi-json-testing.md) |\n| Replace a service | `getContainer()->set()` on a `test.*` public alias, once per test |\n| Follow a redirect with doubles installed | `$this->client->disableReboot()` first |\n| Doubles, Prophecy, data providers, naming | `phpunit:php-test-conventions` |\n",{"name":5,"description":7},"main","479b264ec17cc5fafbf36287a1087472d3a386d3","plugins\u002Fsymfony\u002Fskills\u002Fsymfony-test-conventions",2,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace","https:\u002F\u002Fgithub.com\u002FFabienSalles","https:\u002F\u002Ffabiensalles.com","2026-10-13 04:33:22",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add FabienSalles\u002Fclaude-marketplace --skill symfony-test-conventions",{"tool":58,"command":59},"bunx","bunx skills add FabienSalles\u002Fclaude-marketplace --skill symfony-test-conventions",{"tool":61,"command":62},"pnpm","pnpm dlx skills add FabienSalles\u002Fclaude-marketplace --skill symfony-test-conventions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fsymfony\u002Fskills\u002Fsymfony-test-conventions\u002FSKILL.md",true,[66,72,76],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fapi-json-testing.md","REFERENCE","参考文档",2140,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fsymfony\u002Fskills\u002Fsymfony-test-conventions\u002Freferences\u002Fapi-json-testing.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fformtype-testing.md",4331,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fsymfony\u002Fskills\u002Fsymfony-test-conventions\u002Freferences\u002Fformtype-testing.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Finterface-assertions.md",6315,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fsymfony\u002Fskills\u002Fsymfony-test-conventions\u002Freferences\u002Finterface-assertions.md",[81,98,114,135,156,172],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":39},"01M6DW2YS1MGF65JNS1QQ15QHS","vitest-test-conventions","ACTIVATE when writing Vitest tests, creating test files, using vi.fn()\u002Fvi.mock()\u002Fvi.spyOn(), or test factories. ACTIVATE for 'Vitest', 'it.each', 'NestJS testing module', 'supertest', 'vi.fn', 'vi.mock', 'spyOn'. Provides Vitest\u002FNestJS-specific testing patterns; cross-language testing principles (DAMP, AAA, spy over mock, what NOT to test) live in craft:testing-principles. DO NOT use for: node:test files (a file importing node:test) or a project whose tests run under node --test (see node-test:node-test-conventions), TDD workflow\u002Fiterations (see vitest:vitest-tdd-workflow), PHP\u002FPHPUnit tests (see phpunit:php-test-conventions).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvitest\u002Fskills\u002Fvitest-test-conventions\u002FSKILL.md",[],[20,88,21,89,30,37,36,35,90,91,22,92,93,27,26,94,25,95,96,97],"vitest","vitest test conventions","file","testing patterns","files","nestjs","project","module","fn","testing principles",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":39},"01M6DW2VFE6NPFCGQKQ68P1MVZ","vitest-tdd-workflow","ACTIVATE when building new features, endpoints, or user stories using TDD with Vitest in a TypeScript\u002FNestJS context. ACTIVATE for '\u002Ffeature-tdd-dev', 'TDD', 'red-green-refactor' in TS context. Provides Vitest\u002FNestJS-specific TDD examples and commands; cross-language TDD workflow (cross-layer iterations, RED-GREEN-REFACTOR, working app, bug-fix-first-test, mocks-hiding-bugs) lives in craft:tdd-workflow-principles. DO NOT use for: node:test files (a file importing node:test) or a project whose tests run under node --test (see node-test:node-test-conventions), test writing conventions (see vitest:vitest-test-conventions), PHP TDD (see phpunit:php-tdd-workflow).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvitest\u002Fskills\u002Fvitest-tdd-workflow\u002FSKILL.md",[],[36,35,105,88,106,37,107,90,108,109,22,110,92,27,26,111,94,25,112,113],"tdd workflow","vitest tdd workflow","dev","examples","fix","red-green-refactor","green","feature","app",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":39},"01M6DW2RGMQE10D8C5Z5MA2RMY","ts-refactoring","ACTIVATE when refactoring TypeScript code. ACTIVATE for 'refactor', 'extract', 'redesign', 'simplify', or 'clean up' in a TypeScript \u002F Node \u002F NestJS context. This skill provides TS-specific examples for the cross-language refactoring rules defined in craft:refactoring-principles. DO NOT use for: writing new features from scratch, general OOP patterns (see ts-oop).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-refactoring\u002FSKILL.md",[],[121,122,37,123,124,108,125,126,127,128,129,22,130,131,132,93,133,27,26,134],"refactoring","ts refactoring","typescript","code","refactor","simplify","Rules","node","redesign","up","general","clean","craft","patterns",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":39},"01M6DW2MHYXNBBVYEGB058Y48J","ts-ports-adapters","ACTIVATE when a TypeScript codebase with no dependency-injection container has to declare a port and wire its adapter — a repository, a clock, an id generator, an event dispatcher the domain depends on. ACTIVATE for 'port', 'adapter', 'SPI', 'dependency inversion' or 'composition root' in a codebase that wires its dependencies by hand. Covers: the port as a type of functions in the domain layer, the adapter as an object literal annotated with it, the handler that takes its dependencies first and its data second, the composition root in the infrastructure layer, and the in-memory stub that substitutes for the adapter in a unit test. DO NOT use for: NestJS, or any container-based DI with decorators and tokens (see nest-ddd-conventions), aggregate operations and smart constructors (see ddd-ts-fp), the Result type itself (see ts-functional).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-ports-adapters\u002FSKILL.md",[],[142,143,144,20,145,146,22,29,147,93,148,27,26,149,150,151,152,153,154,155],"ports","ts ports adapters","memory","ddd","Composition","functions","Literal","dependency-injection","domain","tokens","as","type","id","adapter",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":39},"01M6DW2GRXZFYT05HEDB26C9B8","ts-oop","ACTIVATE when designing TypeScript classes, and the value objects or collections modelled as classes, or when the user asks about object design, encapsulation, Tell Don't Ask, or Symbol.iterator. Provides TS-specific examples for the cross-language OOP rules defined in craft:oop-principles, plus TS-specific patterns (Symbol.iterator, branded types for primitive identifiers). DO NOT use for: a value object or an aggregate modelled as an immutable record rather than a class (see ddd-ts-fp), refactoring methodology (see ts-refactoring).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-oop\u002FSKILL.md",[],[163,164,38,123,145,108,165,166,121,127,167,22,168,133,27,26,169,170,171,152],"oop","ts oop","methodology","immutable","ask","refactoring methodology","objects","record","collections",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":39},"01M6DW2D26XG5MJMTP9MSE43S2","ts-layer-boundaries","ACTIVATE when wiring a Worker entry point, a Router, a controller, or a domain event consumer in a TypeScript CQRS codebase, or when deciding where a port belongs. ACTIVATE for 'composition root', 'layer boundary', 'ESLint zones', 'domain must not import infrastructure'. Covers: the *Worker.ts composition root, the curried consumer, Router wiring of command endpoints, the five-gesture controller, the domain-to-infrastructure import boundary enforced by ESLint, infrastructure-only ports, in-memory doubles for every port, the read-can-reach-write asymmetry, and read endpoints going through a domain handler. DO NOT use for: the port's own shape and adapter binding (see ts-ports-adapters), the Result type (see ts-functional), domain event structure (see ts-ddd-events).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-layer-boundaries\u002FSKILL.md",[],[179,144,145,180,181,146,142,22,182,183,28,27,26,184,150,185,186,153,155,187],"ts layer boundaries","controller","boundary","router","only","structure","cqrs","worker","import"]