Skip to content

Install

Install the package as a development dependency:

1
composer require --dev testcontainers/testcontainers

The examples in these docs assume Composer's autoloader is already loaded, as it is in a PHPUnit test suite. To run an example as a standalone script, add require_once 'vendor/autoload.php'; at the top.

Next, see the usage guide for a runnable test example.