Mockery 10,724 (github.com/mockery/mockery (https://github.com/mockery/mockery 10,724 ), BSD-3-Clause, 1.6.15 of 19 August 2026) is the other double library, used by Laravel 2,157 's test helpers. Its spy records every call, so the check follows the action: $mailer = Mockery::spy(Mailer::class), run the checkout, then $mailer->shouldHaveReceived('send')->once()->with(...). The MockeryPHPUnitIntegration trait verifies and closes Mockery after each test.
A fake is a working, simplified implementation you write yourself. InMemoryProducts in tests/Fakes/ implements the same Products interface as the real ProductRepository (findBySku(string $sku): ?Product), keeping products in an array keyed by SKU. Subsection 4.20.13 uses it. Prefer fakes for collaborators used everywhere; mock when the call itself is the point.