testo / bridge-mockery
Mockery bridge for the Testo testing framework.
Fund package maintenance!
0.1.1
2026-07-03 10:45 UTC
Requires
- php: >=8.2
- mockery/mockery: ^1.6
- testo/testo: 0.10.36 - 1
Requires (Dev)
- testo/assert: ^0.1.11
- testo/codecov: ^0.1.11
- testo/test: ^0.1.6
README
Mockery bridge
Important
🪞 This is a read-only mirror.
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.
About
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'])], );
Install
composer require --dev testo/bridge-mockery