Haehnchen / idea-php-toolbox

Collections of tools and improvements to make PhpStorm a little bit better
http://phpstorm.espend.de/php-toolbox
MIT License
158 stars 20 forks source link

Wrong return type for getMockBuilder #59

Closed stof closed 7 years ago

stof commented 7 years ago

In PHPUnit, getMockBuilder does not give you the mock instance, so it is not of the mocked type. The mock is returned by getMock() on the builder instead. And the plugin does not support this pattern.

stof commented 7 years ago

Btw, once this is supported, Prophecy should be handled in the same way (the mock being returned by reveal()

Haehnchen commented 7 years ago

handled nicer in external plugin: https://github.com/Haehnchen/idea-php-phpunit-plugin

stof commented 7 years ago

@Haehnchen does the external plugin also support Prophecy ?

King2500 commented 7 years ago

Yes, obviously ;)