padraic/mockery — pull request #262 by karptonite (2014-01-25 02:03:27+00:00)
Title: Fix distinguishing constructor params and expectation closures

Mockery was unable to tell the difference between expectation closures and constructor params for partial mocks that happened to be callable (which can happen if the constructor params array contains an object and a string that happens to be a method of the object, for example). There was a test in place to test for this, but the array that was supposed to look callable was not actually callable.

This should fix this bug.

To anyone else who runs into this bug before this is merged (or if for some reason this patch can't be merged), I fixed this in my test by adding an extra 'foo' param to my constructor params, so the array was no longer callable. :)