No, this page isn’t about making you feel bad about yourself or your choices. These entries are tagged “mockery” after the Mockery PHP test mocking library.
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,... (more…)