Add custom message to `withCallback()`
Closed this issue · 1 comments
adamkelso commented
Currently, the API for withCallback()
accepts one argument, the closure to filter the history items. A second one should be added so that the user can pass a more helpful message for what their closure is actually checking.
// Before
$expectation->withCallback(function ($history) {
/* something */
return bool;
});
// After
$expectation->withCallback(function ($history) {
return bool;
}, "Failed asserting that the Rhinos are just overweight unicorns.");
adamkelso commented
Completed in release 1.5.1
.