Download the PHP package ez-php/testing-application without Composer
On this page you can find all versions of the php package ez-php/testing-application. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package testing-application
ez-php/testing-application
Framework-coupled PHPUnit base classes for ez-php applications.
This package provides ApplicationTestCase, DatabaseTestCase, and HttpTestCase — test base classes that boot the full ez-php Application stack. It is the framework-aware companion to ez-php/testing, which contains the framework-independent utilities (TestResponse, EntityFactory).
Installation
Base Classes
ApplicationTestCase
Bootstraps a fresh Application instance before each test.
DatabaseTestCase
Extends ApplicationTestCase. Wraps each test in a database transaction that is rolled back on teardown — no table truncation needed.
HttpTestCase
Extends ApplicationTestCase. Dispatches fake HTTP requests through the full middleware and routing stack — no HTTP server required.
MigrationBootstrap / SeederBootstrap
Both are one-shot utilities for a test-suite bootstrap script (e.g. phpunit.xml's
<bootstrap>), not per-test base classes — they boot a fresh Application against the
test database and run the equivalent console command (ez migrate / ez db:seed) once,
before any test runs:
Both register the service providers listed in provider/modules.php (so migrations get
ez-php/orm's SchemaInterface and seeders your module bindings), and both swap
DB_DATABASE for DB_TESTING_DATABASE first (when the latter is set), so
migrations/seeders run against the test schema, not production. A non-zero exit code from
the underlying command is thrown as a RuntimeException, failing the suite immediately
with a clear message rather than letting every test fail against an unmigrated/unseeded
database.
Requirements
- PHP 8.5+
- ez-php/framework
- ez-php/testing (for
TestResponse)
All versions of testing-application with dependencies
phpunit/phpunit Version ^13.0
ez-php/console Version ^2.7.0
ez-php/contracts Version ^2.7.0
ez-php/framework Version ^2.7.0
ez-php/http Version ^2.7.0
ez-php/testing Version ^2.7.0