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
Creating a mock of Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface triggers the following PHP fatal error.
PHP Fatal error: Class Mock_Exception_80007f4f contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface::getResponse) in /home/fabien/Projets/fbourigault/phpunit-mock-interface/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php(42) : eval()'d code on line 3
fbourigault
changed the title
Cannot mock RedirectionExceptionInterface from Symfony.
Cannot mock RedirectionExceptionInterface from Symfony
Dec 4, 2019
sebastianbergmann
changed the title
Cannot mock RedirectionExceptionInterface from Symfony
Cannot double interface that extends interface that extends \Throwable
Dec 4, 2019
Summary
Creating a mock of
Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface
triggers the following PHP fatal error.How to reproduce
I wrote a reproducer as a PHPUnit e2e test: https://gist.github.com/fbourigault/8e6298706db421bee040d57dfe51000f
In the test output, we can notice the missing
foo
method. Also, the mock class name is not the expected one.The text was updated successfully, but these errors were encountered: