dev-toolings/superpowers-symfony115 installs
api-platform-tests
Test API Platform resources with ApiTestCase; assert collections, items, filters, JSON schema, and authentication
How do I install this agent skill?
npx skills add https://github.com/dev-toolings/superpowers-symfony --skill api-platform-testsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides comprehensive documentation and templates for implementing functional API tests within a Symfony and API Platform environment. It follows industry best practices for automated testing and uses standard developer tooling.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Api Platform Tests (Symfony)
Use when
- Writing functional tests for API Platform endpoints: collection, item, create, update, delete.
- Asserting validation errors (422) and access control (401, 403).
- Checking filters, pagination, or the JSON schema of responses.
- Setting up a clean database and test data for API tests.
Default workflow
- Extend
ApiTestCaseand seed data with Foundry factories (createOne,createMany). - Reset state with
#[ResetDatabase]and theFactoriestrait, with DAMA rolling back each test. - Call
static::createClient()->request()and assert the status code, content type, andassertJsonContains(). - Authenticate with
auth_bearerand cover the anonymous, owner, and other-user cases. - Assert
memberandtotalItemsfor filters and pagination (hydra:-prefixed only withhydra_prefix: true). - Assert the shape with
assertMatchesResourceItemJsonSchema()andassertMatchesResourceCollectionJsonSchema().
Guardrails
- Send
PATCHwith theapplication/merge-patch+jsoncontent type. #[ResetDatabase]needs PHPUnit 10+ and Foundry 2.9: use theResetDatabasetrait on PHPUnit 9.- Cover the failure paths too: 404, 422, 401, 403. A type error on a constrained property is 422 in 5.0 but 400 in 4.4 and earlier.
- Read the configured items per page rather than hardcoding a page size in assertions.
Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
Output contract
- The test classes added and the endpoints they cover.
- Factories and reset strategy used.
- Test run output, including the failure paths.
References
reference.md
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/dev-toolings/superpowers-symfony/api-platform-tests">View api-platform-tests on skillZs</a>