testo / bridge-double
Double bridge for the Testo testing framework.
Fund package maintenance!
Requires
- php: >=8.3
- jasonmccreary/double: ^0.6.1
- testo/testo: 0.10.39 - 1
Requires (Dev)
- testo/assert: ^0.1.13
- testo/bridge-revolt: ^0.1.1
- testo/codecov: ^0.1.12
- testo/fiber: ^0.1.2
- testo/test: ^0.1.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-12 15:38:43 UTC
README
Double bridge
Important
🪞 This is a read-only mirror.
Active development of the Testo project lives in php-testo/testo under bridge/double/. This repository is automatically synchronized from there on every release.
File issues and pull requests in the main monorepo, not here.
About
Double is a modern PHP test-double library — one unified Double type covers mocks, stubs and spies. This bridge wires its verification into Testo: register DoublePlugin and Double::verifyAll() is called after every test, so expects() and received() assertions are always verified and the pending doubles are cleared between tests — no per-test verify() boilerplate.
// testo.php use Testo\Application\Config\ApplicationConfig; use Testo\Application\Config\SuiteConfig; use Testo\Bridge\Double\DoublePlugin; return new ApplicationConfig( plugins: [new DoublePlugin()], suites: [new SuiteConfig(name: 'Unit', location: ['tests/Unit'])], );
use JMac\Testing\Double; $repository = Double::for(BookRepository::class); $repository->expects('find')->with(123)->returns($book); $service = new CatalogService($repository); $service->lookup(123); // The plugin verifies `find` was called as expected once the test returns.
Install
composer require --dev testo/bridge-double