Blog
How Double chooses which expectation wins
A detailed review of how Double improves the developer experience by adjusting its logic for choosing which expectation wins.
What about method-level `passthru`?
Mockery lets one stubbed expectation run the real method. Double doesn't, and the reason isn't a missing feature — it's what that need is usually actually asking for.
Why doesn't Double mock magic methods?
__call() has no fixed shape to check a stub against. Two real examples show what to double instead — and one case where the answer isn't Double at all.
What about "unnamed mocks"?
Why Double doesn't offer an equivalent to Mockery::mock() and what to reach for instead.
What does a good failure message look like?
A close read of a real Double failure message, piece by piece.
How is Double better than Mockery?
A reply to a question from r/PHP on what actually improves once you move from Mockery to Double.
Why not `hasReceived()` or `assertReceived()`?
Why Double settled on received() instead of a has- or assert-prefixed verb, and why that was a deliberate trade-off.
Why is it called "Double"?
"Double" borrows its name from "test double," the generic term for any stand-in used in place of a real dependency in a test.
A PHP Mockery alternative
Double is a PHP test double library and Mockery alternative that keeps the syntax you know while improving your developer experience.