Tests

Definition

Tests classes are created to test the Application classes are working as expected.

The two most essential Tests types for this architecture are the Unit Tests and the Functional Tests. However, Integration and Acceptance Tests can be used as well.

Principles

Containers MAY be covered by all types of Tests.

Use Functional Tests to test Container Routes are doing what’s expected from them.

Use Unit Tests to test Container Actions and Tasks are doing what’s expected from them.

Rules

All Container Tests classes SHOULD extend from a Container Internal TestCase class {container-name}/tests/TestCase.php. The container TestCase MUST extends from the main TestCase on the Ship layer App\Ship\Parents\Tests\PhpUnit\TestCase. (Adding functions to the container TestCase allows sharing those functions between all Test classes of the Container).