laravel/framework — pull request #3095 by alexandre-butynski (2013-12-31 17:20:41+00:00)
Title: Add unit tests for Illuminate\Database\Eloquent\Builder

Just add tests for untested methods.

Also a small refactoring to extract code that is just dumb mock configuration and to make the code more consistent.

There are still untested methods that really need tests like `has()` and its sub-functions. I will submit it next days if I have time.

-

One refactoring question : why using PHPUnit mocks instead of Mockery for partial mocks ? Is that only because partial mocks in mockery can't use magic methods or is there an other reason ? And what do you think about using built-in mocks only when it is absolutely necessary ? I don't know if it's better to have consistency between all the partial mocks or between mocks in general when it's possible but I'm sure that Mockery syntax is really much cleaner.