padraic/mockery — Issue #54: More informative response when failing with() match
Author: glenjamin
Created: 2012-02-23 15:32:07+00:00
State: open

The following code:
```php
$publishOptions = array(
'reply_to' => $requestId,
'correlation_id' => $requestId . '-1',
'headers' => array('a' => 'b')
);
$this->amqpExchange->shouldReceive('publish')
->once()->with(equalTo($body), equalTo($key),
nullValue(), $publishOptions);
```

Produced this test failure:

```
Mockery\Exception: No matching handler found for Fake_AMQPExchange::publish("", "oxicaller", "", Array). Either the method was unexpected or its arguments matched no expected argument list for this method
```

It would be nice to be able to provide more information on the exact part of the match which failed, or a list of the matches which are available - perhaps even which one matched 3 out of 4 arguments!

I'm unsure whether this would make sense to be on by default, or as some sort of verbose mode.

If i find some time, I may try and work on this myself - but i'd happily accept guidance about the direction to take.