I have the following setup: I make fun of a non-abstract class with PHPUnit, but not all of its methods. Therefore, non-mocking methods still exist as a call to real methods in the layout.
And the question arises: how to hint that these methods are available (of course, with the appropriate signature)?
I will describe a little. Sample class:
class RealClass
{
public function callApi(Api $api) {}
public function doStuff(Foo $foo, Bar $bar) {}
}
Now I do in the test:
$mock = $this->getMock('\RealClass', ['callApi']);
This will create mock only for callApi(), but then if in the test:
$mock->doStuff($foo, $bar);
My PHPStorm cannot find the method explicitly and assumes this is an error. How can I indicate that a method exists doStuff()and that the correct arguments are required?
@method , . @see, . , , return, mocks .
" " - , , - , . , , .