Robert Basic

Results 61 comments of Robert Basic

Wouldn't you do this with a [demeter chain mock](http://docs.mockery.io/en/latest/reference/demeter_chains.html)?

The #854 PR tries to provide support for `new static`.

Relabeled the ticket towards 2.0, so I'm ok with that!

I think this would be quite a big BC break, so we should consider this for 2.0.

That's almost on purpose, because I'd like people not to use it :D

@josefsabl maybe try and make the mock a [partial mock](http://docs.mockery.io/en/latest/reference/partial_mocks.html)? So that way the original `__unset` method gets called. Also, why do you think the error message is weird? The...

Yes, it is about UX/DX (developer experience). I've been using Mockery for more than 5 years so I understand what it means when I get an exception like that, but...

@peixinchen could you please provide the test and the code you're testing as well? Thanks!

Couldn't (yet) track down the real issue, but a workaround for this should be something like this: ``` $mock = $this->container->mock('Mockery_Demeterowski'); $mock->shouldReceive('foo')->andReturn($mock); $mock->shouldReceive('baz')->andReturn('Spam!'); $mock->shouldReceive('spam')->andReturn('Bunny!'); $demeter = new Mockery_UseDemeter($mock); $this->assertSame('Spam!Bunny!', $demeter->doitTogether());...

Reopening as demeter chains indeed have a problem.