Better failing tests with Mockery::on()
In an earlier post titled Use $this->fail()
with Mockery::on()
, I explained the challenges of debugging a failing test with the closure passed to Mockery::on()
. Instead of returning false
, I opted to use $this->fail()
- which seemed like a good idea at the time. After all, I was doing my test, then failing with a useful bit of information. (Previous to this, it would just say that you don’t have a matching handler for this assertion, which was really confusing).