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
I have been using PHP-mock-phpunit to mock out some built in PHP functions, and compared to some other PHP mocking libraries I have tried, it seems to work pretty well. And it also seems to integrate OK with CodeCeption's take on PHPUnit tests so that was good.
However, now that my unit tests are running and I switch back to continue on my phpbrowser acceptance tests with CodeCeption, I get the following error:
Codeception PHP Testing Framework v3.1.2
Powered by PHPUnit 8.5.2 by Sebastian Bergmann and contributors.
Running with seed:
PHP Fatal error: Declaration of Codeception\Test\Test::toString() must be compatible with PHPUnit\Framework\SelfDescribing::toString(): string in /project/vendor/codeception/codeception/src/Codeception/Test/Test.php on line 18
Fatal error: Declaration of Codeception\Test\Test::toString() must be compatible with PHPUnit\Framework\SelfDescribing::toString(): string in /projectvendor/codeception/codeception/src/Codeception/Test/Test.php on line 18
and that's where it stops. I can't get the acceptance test to run at all.
If I use composer to uninstall PHP-mock-phpunit, then the acceptance tests fire up fine.
Presumably PHPMock is tweaking some classes behind the scenes and that is breaking things...
Indeed, that seems very likely - neither of these files are PHPMock files. However, when I add PHPMock to the mix, Codeception stops working... I will link this issue to CodeCeption and see if one of the devs there can shed some light on the matter. Thanks for your speedy response.
I have been using PHP-mock-phpunit to mock out some built in PHP functions, and compared to some other PHP mocking libraries I have tried, it seems to work pretty well. And it also seems to integrate OK with CodeCeption's take on PHPUnit tests so that was good.
However, now that my unit tests are running and I switch back to continue on my phpbrowser acceptance tests with CodeCeption, I get the following error:
and that's where it stops. I can't get the acceptance test to run at all.
If I use composer to uninstall PHP-mock-phpunit, then the acceptance tests fire up fine.
Presumably PHPMock is tweaking some classes behind the scenes and that is breaking things...
Here is my
composer.json
:Any suggestions?
The text was updated successfully, but these errors were encountered: