Closed ruudk closed 3 weeks ago
How does PHPUnit code with this method look like? Just to verify.
Have you tested it locally?
$mock = $this->getMockBuilder(FetchMethod::class)
->disableOriginalConstructor()
->onlyMethods($methods)
->getMock();
So that works the same as:
$mock = $this->createMock(EventRecorder::class);
I did not test it, but I feel this is the same thing.
I think we should also do the same for createStub
. But I don't use that myself.
Could you test it locally, please? Otherwise we'll have to add testing suite to make sure these are picked up correctly. Which we might have as well :)
Ok, I just tested it and it does work perfectly!
It should also detect PHPUnit's
\PHPUnit\Framework\TestCase::getMockBuilder
.