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
class MyClass {
__construct(TypeA & TypeB $arg) {}
}
then while trying to mock it:
new \Mockery::mock(MyClass::class)
You will encounter an error:
Error: Call to undefined method ReflectionIntersectionType::getName()
As Mockery is a PHPUnit wrapper it should be actually possible.
Currently as a fallback I use native PHPUnit mocks and it works.
Probably PHPUnit 9.5 supports mocking such types starting from this sebastianbergmann/phpunit#4932
In my case 9.5.20 is ok. I don't know into which exact version was the abovementioned support backported.
The text was updated successfully, but these errors were encountered:
For example if You have an object
then while trying to mock it:
You will encounter an error:
As Mockery is a PHPUnit wrapper it should be actually possible.
Currently as a fallback I use native PHPUnit mocks and it works.
Probably PHPUnit 9.5 supports mocking such types starting from this sebastianbergmann/phpunit#4932
In my case 9.5.20 is ok. I don't know into which exact version was the abovementioned support backported.
The text was updated successfully, but these errors were encountered: