Mockery bridge
Important
Active development of the Testo project lives in php-testo/testo under bridge/mockery/. This repository is automatically synchronized from there on every release.
File issues and pull requests in the main monorepo, not here.
Automatic Mockery teardown for Testo. Register MockeryPlugin and \Mockery::close() is called in a finally block after every test, so mock expectations are always verified and the Mockery container is cleared between tests — no per-test teardown boilerplate.
// testo.php
use Testo\Application\Config\ApplicationConfig;
use Testo\Application\Config\SuiteConfig;
use Testo\Bridge\Mockery\MockeryPlugin;
return new ApplicationConfig(
plugins: [new MockeryPlugin()],
suites: [new SuiteConfig(name: 'Unit', location: ['tests/Unit'])],
);composer require --dev testo/bridge-mockery