Search by

testo / bridge-double

roxblnfk

Double bridge for the Testo testing framework.

Package info

github.com/php-testo/bridge-double

pkg:composer/testo/bridge-double

Fund package maintenance!

Boosty

Statistics

Installs: 0

Dependents: 0

Suggesters: 1

Stars: 0

1.x-dev 2026-08-25 16:11 UTC

This package is auto-updated.

Last update: 2026-09-12 15:38:43 UTC


README

TESTO

Double bridge

Documentation Support on Boosty


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

PHP Latest Version on Packagist License Total Downloads