Dave Marshall
Dave Marshall
Not overly familiar with Laravel's facade/mockery support, so not entirely sure if I'm honest, but you could try adding: ```php DB::shouldReceive('when')->andReturnSelf(); ```
@senseysensor it's kind of tricky and is quite a luxury, which is why I haven't bothered trying to work on it yet, others may have some time.
@fhinkel I think you did :)
Massive :+1: for this. We record all calls now, just need a neat way of outputting them. I think using `sebastianbergmann/exporter` et all could make this a lot neater than...
I'm sorry, I missed this when it came in. I'm still not entirely sure if we should proceed with this.
We could probably look in to something like this with [roave/better-reflection](https://github.com/Roave/BetterReflection), but it would be a lot of work I reckon.
There's a PR that might cover this #712, take a look and if it does, give it a thumbs up :+1:
Must be something to do with the slashes? Maybe we could try ``` php preg_match("/^Iterator(|Aggregate)$/i", ltrim($interface, "\\")) ```
Open the PR and we'll take a look :+1: At worst, there'll be a working example for others to look at.
You can configure this globally, but not for a specific mock ``` Mockery::getConfiguration()->allowMockingNonExistentMethods(false); ``` https://davedevelopment.co.uk/2016/04/20/verifying-doubles-in-php.html