Automated payload contract testing with strategy-based validation and multiple test profiles.
Validates payload contracts by executing configurable test strategies against each payload marked with #[TestablePayload]. Supports security, HTTP method, type enforcement, and monkey testing strategies at multiple strictness levels.
Depends on Core. Used by application test suites to verify that payload contracts behave correctly under various conditions without writing individual test cases per endpoint.
#[TestablePayload]attribute with configurable strategies and contextPayloadContractTesterorchestrates strategy execution- Strategies:
SecurityStrategy,HttpMethodStrategy,TypeEnforcementStrategy,MonkeyTestingStrategy - Profiles:
StandardProfileStrategy,StrictProfileStrategy,ParanoidProfileStrategy InProcessTransport(direct Application call) andHttpTransport(HTTP mode)TestsPayloadsPHPUnit trait for integrationPayloadMetadataFactoryextracts test metadata
The InProcessTransport calls Application::handleRequest() directly, bypassing HTTP overhead. Use HttpTransport for end-to-end testing against a running Swoole server.