Restore strict expectations in tests converted to Double
Double accepts unexpected calls by default and compares object arguments by value. Some tests lost checks when they moved from Mockery. They could pass if a handler received a different instance or if code called an unexpected method.
The tests now use strict doubles unless they deliberately ignore unrelated calls. They check object identity where the same request, job, connection or exception must be passed through. Tests that record arguments do so after a call matches. The suite uses Double's development branch for its fixes to expectation verification.
Several tests now check the result directly. For example, the permission scope tests exercise both integer and UUID keys, and the Reverb test checks that a subscribed socket actually receives the broadcast.
There’s also a fix for idle database connections. If releasing one lease throws, the resolver now attempts to release the remaining leases before propagating the failure. Cancellation takes precedence if cleanup encounters both cancellation and another error.
[!NOTE]
Convert test suite to strict Doubles and make idle-connection release failure-tolerant
- Switches test doubles across the framework test suite to strict mode, so unconfigured calls to mocks now fail the tests. Many expectations also switch to
Argument::same() to require exact object instances for exceptions, jobs, connections, and events.
- Replaces placeholder
assertTrue(true) patterns with real assertions, expectNotToPerformAssertions(), or Argument::capture() plus post-call checks.
- Changes
jasonmccreary/double to dev-master in composer.json to support the strict-double setup.
- Fixes
ConnectionResolver::releaseIdleConnections() in ConnectionResolver.php: it now catches each releaseIfIdle() failure, continues the loop, prefers cancellation, and throws the first retained failure after the loop.
- Risk: the strict doubles may surface previously unnoticed interactions as test failures;
releaseIdleConnections() now defers the first failure until all idle connections are released instead of aborting mid-loop.
Macroscope summarized 3dab76a.