You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I mock class and call shouldReceive in same test method, it works
function testMyClass
{
$myClass = Mockery::mock(MyClass::class);
$myClass->shouldReceive('doSomething');
}
otherwise, if I declare the mock as instance variable in setUp method, and call shouldReceive in test method, psalm doesn't work getting UndefinedMethod
private $myClass;
function setUp()
{
$this->myClass = Mockery::mock(MyClass::class);
}
function testMyClass
{
$this->myClass->shouldReceive('doSomething');
}
When I call
shouldReceive
method on a mocked class I get the UndefinedMethod error.I have already seen this issue but it is not clear to me how to solve
The text was updated successfully, but these errors were encountered: