Class Property vs local variable has different result.
jonnywilliamson opened this issue · 4 comments
I'm not sure if this is a bug, but I just want to highlight something I've come across and wondered if someone could shine some light on it.
If I create a very simple test like the following and generate a prophesize object as a normal variable inside a function, I get full autocomplete working:
If however I do the exact same thing, only this time create the prophesize object and set it as a property on the class, when I try and access it again, no auto-complete works:
Is this intentional? Or is it a limitation of how the plugin works etc?
Thanks for any help/insight into this issue!
I've got the same issue with $this->fake = $this->createMock()
and $this->fake = $this->createPartialMock()
.
Hmm, must have thought that was something different or I had forgotten about that!
tested and working; catched also with a test