phpunit-integration-test-generation

phpunit-integration-test-generation is a skill for Claude Code from shopwareLabs/ai-coding-tools. It costs 184 tokens per session (2,836 once invoked), scanned A, original, MIT.

A workflow for generating PHPUnit integration tests for Shopware 6 classes whose behavior depends on connected application code. Integration tests exercise several real parts together, such as services, a database, or message handling.

In plain words
What is it for?
Use it for controllers, indexers, message handlers, and other source classes whose contracts require real application connections. It generates integration tests, validates them with PHPStan, PHPUnit, and ECS, and reports whether fixes succeeded.
Why use it?
It separates tests that need the application's wiring from unit tests that run in isolation. It also checks the generated tests for Shopware conventions and common validation errors.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Part of the test-writing plugin — 11 skills, 3 agents shipped together

Good fit Use it for controllers, indexers, message handlers, and other source classes whose contracts require real application connections. It generates integration tests, validates them with PHPStan, PHPUnit, and ECS, and reports whether fixes succeeded.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shopwareLabs/ai-coding-tools --skill phpunit-integration-test-generation
Clone the repo
git clone --depth 1 https://github.com/shopwareLabs/ai-coding-tools

Made for: Claude Code.

Or install test-writing, the plugin that ships this one along with the rest of its 11 skills, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for phpunit-integration-test-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation/github.svg)](https://agentmods.dev/skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation)
Your own site
<a href="https://agentmods.dev/skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation"><img src="https://agentmods.dev/badge/skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for phpunit-integration-test-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation"><img src="https://agentmods.dev/badge/skills/shopwarelabs/ai-coding-tools/phpunit-integration-test-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00184 $0.02836
Opus 5.5 $0.00074 $0.01134
Sonnet 5.5 $0.00037 $0.00567
Haiku 4.5 $0.00018 $0.00284

Measured 1mo ago against content hash 49b41646268a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

phpunit-integration-test-generation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/test-writing/skills/phpunit-integration-test-generation/SKILL.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PHPUnit Integration Test Generation

Generate Shopware-compliant PHPUnit integration tests that exercise wired-up code through IntegrationTestBehaviour, produce integration-shape assertions, and pass PHPStan and PHPUnit validation.

File Write Restrictions

Write ONLY to:

  • tests/integration/** — Integration test files

NEVER write to:

  • src/** — Source code (read-only)
  • tests/unit/** — Out of scope (use phpunit-unit-test-generation)
  • tests/migration/** — Out of scope (use phpunit-migration-test-generation)
  • Any other directory

Workflow

digraph integration_test_generation {
    "User invocation" [shape=doublecircle];
    "Validate input" [shape=box];
    "Source is PHP class in src/?" [shape=diamond];
    "Analyze source" [shape=box];
    "Integration pattern detected?" [shape=diamond];
    "Select template + apply" [shape=box];
    "Write test file" [shape=box];
    "Validate (PHPStan, PHPUnit, ECS)" [shape=box];
    "All green?" [shape=diamond];
    "Fix iteration (max 3)" [shape=box];
    "Iterations exhausted?" [shape=diamond];
    "Report SUCCESS" [shape=doublecircle];
    "Report PARTIAL" [shape=doublecircle];
    "Report SKIPPED (defer to unit gen)" [shape=doublecircle];
    "Report FAILED" [shape=doublecircle];

    "User invocation" -> "Validate input";
    "Validate input" -> "Source is PHP class in src/?";
    "Source is PHP class in src/?" -> "Report FAILED" [label="no"];
    "Source is PHP class in src/?" -> "Analyze source" [label="yes"];
    "Analyze source" -> "Integration pattern detected?";
    "Integration pattern detected?" -> "Report SKIPPED (defer to unit gen)" [label="no — unit-shape SUT"];
    "Integration pattern detected?" -> "Select template + apply" [label="yes"];
    "Select template + apply" -> "Write test file";
    "Write test file" -> "Validate (PHPStan, PHPUnit, ECS)";
    "Validate (PHPStan, PHPUnit, ECS)" -> "All green?";
    "All green?" -> "Report SUCCESS" [label="yes"];
    "All green?" -> "Iterations exhausted?" [label="no"];
    "Iterations exhausted?" -> "Report PARTIAL" [label="yes"];
    "Iterations exhausted?" -> "Fix iteration (max 3)" [label="no"];
    "Fix iteration (max 3)" -> "Validate (PHPStan, PHPUnit, ECS)";
}

Read the full file on GitHub · 208 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed 49b41646268a
  2. 1mo ago Changed 737a199c2a41
  3. 1mo ago Changed 6e5ae108c891
  4. 1mo ago Changed a1b186e093a2
  5. 1mo ago First seen · 208 lines · 184 tokens per session scan A 1085f9602fea

Subscribe to this mod's changes

phpunit-integration-test-generation is a skill published in the GitHub repository shopwareLabs/ai-coding-tools (45 stars, last pushed 4d ago), licensed MIT. It adds 184 tokens to every session and 2,836 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.