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
In one of my test I had defined a constructor and forgot to call the parent constructor. When trying to run this test phpunit crashed with Fatal error: Call to a member function getMock() on a non-object in phar:///usr/bin/phpunit/phpunit/Framework/TestCase.php on line 1301. It took me some time the find the wrong test, because there is no stacktrace. This is an issue with PHPUnit 4, the test worked in PHPUnit 3.x. It would be nice to print a message saying something like 'Call parent::__construct in class foo.'
The text was updated successfully, but these errors were encountered:
Fixessebastianbergmann#1164
Instead of setting up the mock object generator in TestCase's
constructor, it's created whenever a call to `getMockObjectGenerator` is
made.
In one of my test I had defined a constructor and forgot to call the parent constructor. When trying to run this test phpunit crashed with
Fatal error: Call to a member function getMock() on a non-object in phar:///usr/bin/phpunit/phpunit/Framework/TestCase.php on line 1301
. It took me some time the find the wrong test, because there is no stacktrace. This is an issue with PHPUnit 4, the test worked in PHPUnit 3.x. It would be nice to print a message saying something like 'Call parent::__construct in class foo.'The text was updated successfully, but these errors were encountered: