Open patkoscsaba opened 8 years ago
I'm doing the same right now, but with proper annotations:
class MyTest extends TestCase {
/**
* @var ObjectProphecy|MyOtherClass
*/
private $otherClass;
protected function setUp() {
$this->otherClass = $this->prophesize(MyOtherClass::class);
}
public function testStuff() {
$this->otherClass->someMethod()->willReturn(42);
}
}
It still doesn't work. ->willReturn() is "not found in class MyOtherClass" by PhpStorm. Is it safe to assume that this will be implemented together with issue #9?
I am looking forward for this too
Add autocomplete for class variables initialized in setUp() similar to the ones initialized in __construct().
Example:
class someTest extends .... {
private $var;
function setUp() { $this->var = new SomeClass(); }
function testSomething() { $this->var->[expect autocomplete here with the methods of SomeClass] } }