Test Double code generator does not handle new expressions inside parameter default values #4929
Labels
feature/test-doubles
Test Stubs and Mock Objects
type/bug
Something is broken
type/change-in-php-requires-adaptation
A change in PHP requires a change so that existing PHPUnit functionality continues to work
Summary
createMock is not working with new in initializers
Current behavior
Tests fail with an incomprehensible error:
PHP Fatal error: Constant expression contains invalid operations in /var/www/html/app/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php(51) : eval()'d code on line 9
How to reproduce
Expected behavior
Mock is created successfully.
The text was updated successfully, but these errors were encountered: