Double

Documentation

  1. Introduction
  2. Installation
  3. Creating Doubles
  4. Expectations
  5. Argument Matching
  6. Verification
  7. Failure Messages
  8. Test Suite Integration
  9. Migrating from Mockery
  10. Contributing

Resources

  1. Blog
  2. GitHub
  3. X

Blog

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.

On this page

  1. What does a good failure message look like?
  2. How is Double better than Mockery?
  3. Why not `hasReceived()` or `assertReceived()`?
Double MIT Licensed jasonmccreary/test-double