Central test fixture definitions and runner for verifying ADP collectors across all adapters and playgrounds.
- Composer:
app-dev-panel/testing - Namespace:
AppDevPanel\Testing\ - PHP: 8.4+
- Dependencies:
guzzlehttp/guzzle,guzzlehttp/psr7,symfony/console
libs/Testing/src/
├── Fixture/
│ ├── Fixture.php # Single test fixture definition
│ ├── Expectation.php # Assertion about collector data
│ ├── RequestOptions.php # HTTP request options for fixtures
│ └── FixtureRegistry.php # Central registry of ALL fixtures
├── Assertion/
│ ├── AssertionResult.php # Pass/fail result
│ ├── ExpectationEvaluator.php # Evaluates expectations against data
│ ├── FieldAssertionEvaluator.php # Evaluates field-level assertions
│ ├── CollectionFieldEvaluator.php # Evaluates collection field assertions
│ └── PathResolver.php # Resolves dot-notation paths in data
├── Runner/
│ ├── FixtureRunner.php # HTTP-based fixture executor
│ ├── FixtureResult.php # Result of running one fixture
│ ├── CollectorDataResolver.php # Resolves collector data from debug entries
│ └── DebugDataFetcher.php # Fetches debug data from API
└── Command/
├── DebugFixturesCommand.php # CLI command to run fixtures
└── FixtureResultRenderer.php # Renders fixture results to console
libs/Testing/tests/
├── Unit/
│ ├── Fixture/
│ │ └── FixtureRegistryTest.php # Registry structure, uniqueness, tag coverage
│ └── Assertion/
│ └── ExpectationEvaluatorTest.php # Evaluator logic for all expectation types
└── E2E/
├── FixtureTestCase.php # Base PHPUnit test case for HTTP E2E
├── CoreFixturesTest.php # Core collector tests (logs, events, dump, timeline)
├── WebFixturesTest.php # Web context tests (request, app info)
├── ErrorFixturesTest.php # Exception tests (runtime, chained)
├── AdvancedFixturesTest.php # Multi-collector, heavy, http-client, filesystem
├── SecurityFixturesTest.php # AuthorizationCollector fixture tests
├── DebugApiTest.php # Debug API endpoint contract tests
├── InspectorApiTest.php # Inspector API endpoint tests (database)
├── AuthorizationInspectorTest.php # Authorization inspector endpoint tests
├── McpApiTest.php # MCP (JSON-RPC) API endpoint tests
└── ScenarioTest.php # Full pipeline E2E: reset, fire all fixtures, verify API
- FixtureRegistry defines all test fixtures in ONE place
- Each Fixture specifies: endpoint path, HTTP method, expected collector data
- Each playground implements the endpoint contract under
/test/fixtures/* - FixtureRunner hits the endpoint, then queries
/debug/api/view/{id}to verify - ExpectationEvaluator checks actual collector data against expectations
- Add a new
FixturetoFixtureRegistrywith expectations - Add the endpoint to each playground controller (Symfony, Yii2, Yii3)
- Run
debug:fixturesto verify
All playgrounds must implement these endpoints under /test/fixtures/:
| Endpoint | Fixture | Collectors Tested |
|---|---|---|
/test/fixtures/logs |
logs:basic | LogCollector |
/test/fixtures/logs-context |
logs:context | LogCollector |
/test/fixtures/events |
events:basic | EventCollector |
/test/fixtures/dump |
var-dumper:basic | VarDumperCollector |
/test/fixtures/timeline |
timeline:basic | TimelineCollector |
/test/fixtures/request-info |
request:basic | RequestCollector, WebAppInfoCollector |
/test/fixtures/exception |
exception:runtime | ExceptionCollector |
/test/fixtures/exception-chained |
exception:chained | ExceptionCollector |
/test/fixtures/multi |
multi:logs-and-events | LogCollector, EventCollector, TimelineCollector |
/test/fixtures/logs-heavy |
logs:heavy | LogCollector |
/test/fixtures/http-client |
http-client:basic | HttpClientCollector |
/test/fixtures/filesystem |
filesystem:basic | FilesystemStreamCollector |
/test/fixtures/filesystem-streams |
filesystem:streams | FilesystemStreamCollector |
/test/fixtures/database |
database:basic | DatabaseCollector |
/test/fixtures/mailer |
mailer:basic | MailerCollector |
/test/fixtures/queue |
queue:basic | QueueCollector |
/test/fixtures/validator |
validator:basic | ValidatorCollector |
/test/fixtures/router |
router:basic | RouterCollector |
/test/fixtures/cache |
cache:basic | CacheCollector |
/test/fixtures/cache-heavy |
cache:heavy | CacheCollector |
/test/fixtures/translator |
translator:basic | TranslatorCollector |
/test/fixtures/security |
security:basic | AuthorizationCollector |
/test/fixtures/opentelemetry |
opentelemetry:basic | OpenTelemetryCollector |
/test/fixtures/elasticsearch |
elasticsearch:basic | ElasticsearchCollector |
/test/fixtures/redis |
redis:basic | RedisCollector |
/test/fixtures/request-info |
web:app-info | WebAppInfoCollector |
/test/fixtures/coverage |
coverage:basic | CodeCoverageCollector |
/test/fixtures/reset |
(setup) | Clears debug storage directly |
/test/fixtures/reset-cli |
(setup) | Clears debug storage via debug:reset CLI command |
The reset endpoints (/test/fixtures/reset and /test/fixtures/reset-cli) accept both GET and POST. ScenarioTest uses GET to clear storage before running the full fixture suite.
Yii3 playground applies FormatDataResponseAsJson middleware to the entire /test/fixtures route group so all fixture responses return JSON.
Two ways to run: CLI command or PHPUnit E2E tests. Both require a running playground server.
debug:fixtures http://localhost:8080 # All fixtures
debug:fixtures http://localhost:8080 --tag=core # By tag
debug:fixtures http://localhost:8080 -s logs:basic # Single fixture
debug:fixtures http://localhost:8080 --list # List without running
debug:fixtures http://localhost:8080 -v # Verbose assertions# Run all fixture tests against a playground
PLAYGROUND_URL=http://127.0.0.1:8102 php vendor/bin/phpunit --testsuite Fixtures
# Run specific group
PLAYGROUND_URL=http://127.0.0.1:8102 php vendor/bin/phpunit --testsuite Fixtures --group core
# Available groups: core, web, error, advanced, api, mcp, scenariomake fixtures # CLI fixtures against all playgrounds
make test-fixtures # PHPUnit E2E against all playgrounds
make test-fixtures-symfony # PHPUnit E2E against Symfony only