Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cases don't run under PHPUnit 6 and greater #3003

Open
blackshadowshade opened this issue Nov 1, 2024 · 1 comment
Open

Test cases don't run under PHPUnit 6 and greater #3003

blackshadowshade opened this issue Nov 1, 2024 · 1 comment

Comments

@blackshadowshade
Copy link
Contributor

blackshadowshade commented Nov 1, 2024

I'm currently trying to bring my development stack up to date and I stumbled across this message when attempting to run unit tests:

Class "PHPUnit_Framework_TestCase" not found

This occurs because I installed PHPUnit 11.4.3, and because namespacing was implemented in PHPUnit6.

According to https://stackoverflow.com/questions/6065730/why-fatal-error-class-phpunit-framework-testcase-not-found-in, the solution is

You will need to refactor things like \PHPUnit_Framework_TestCase to \PHPUnit\Framework\TestCase

I thought I would note this here because we'll probably be wanting to upgrade at some stage and this problem will need to be addressed.

@blackshadowshade
Copy link
Contributor Author

Just noting that PHPUnit version is reasonably closely linked to PHP version:

https://phpunit.de/supported-versions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant