padraic/mockery — pull request #58 by rojoca (2012-03-13 19:41:05+00:00)
Title: Demeter chain methods with arguments

I found that adding demeter chain expectations where the methods in the chain were called with arguments e.g.,

$mock->shouldReceive('foo->bar->baz')->shouldReturn(10);
$object->foo("foo")->bar("bar")->baz();

throws a Mockery\Exception with message "No matching handler found for Mockery_Demeterowski::foo("foo"). Either the method was unexpected or its arguments matched no expected argument list for this method"

To fix this I removed the `withNoArgs` expectation applied in `_buildDemeterChain`.