class MainTest extends TestCase
{
public function testMain()
{
$stub = $this->createMock(Project\NotImplementedClass::class);
$stub->method('doSomething')
->will($this->returnCallback(function ($string) {
return strtoupper($string);
}));
$this->assertEquals('ABC', $stub->doSomething('abc'));
}
}
PhpStorm tells that method doSomething doesn't exists. I searched any plugin which can autocomplete methods. Is any plugin for this?
doSomethingto be defined? If this is just a "hello world" unit test you're creating, why not define a method yourself and stub it out?