padraic/mockery — pull request #135 by Mezzle (2013-03-06 11:25:58+00:00)
Title: Fix for Return by Reference Bug

When trying to mock a function that returns by reference, the internals
of the mocked class do not actually return by reference - because the
call to the __call function makes it return by value. Assigning this to
a variable and then returning it allows it to not throw a "Only variable
references should be returned by reference" error. This doesn't affect
functions that aren't return by reference - other than adding a new
variable to be Garbage Collected.