-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvocationMocker::method has been marked as internal #69
Comments
Hey @JoshuaBehrens, can you provide the failing test case? |
weirdan
added
the
more info needed
There's no enough information provided to address the issue
label
May 4, 2020
Yeah sure I can provide a sample:
Results in:
I currently by-pass it with whitelisting these in my psalm.xml like this: <?xml version="1.0"?>
<psalm
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<issueHandlers>
<InternalMethod>
<errorLevel type="info">
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::after"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::canDefineParameters"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::id"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::method"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::will"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturn"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturn"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturnArgument"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturnCallback"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturnMap"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturnOnConsecutiveCalls"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturnReference"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturnSelf"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willThrowException"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::with"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::withAnyParameters"/>
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::withConsecutive"/>
</errorLevel>
</InternalMethod>
</issueHandlers>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin" />
</plugins>
</psalm> As you can see the phpunit plugin is enabled and psalm-plugin sees it the same:
Do you need any more info? |
weirdan
removed
the
more info needed
There's no enough information provided to address the issue
label
May 4, 2020
No, that should be enough. |
This should be fixed in the next release of PHPUnit (8.5.9). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am unsure whether this is right here. I am using psalm, phpunit and this plugin together.
PHPUnit\Framework\MockObject\Builder\InvocationMocker
is marked as internal but it is the way to mock objects. So when I combine them I have to start mocking everything manually?The text was updated successfully, but these errors were encountered: