This morning, I realized that the version of PHPUnit supplied with Xampp has been deprecated for quite a while... . The version 3.7.21. installed in Xampp, but the actual version (at the time of this writing) is 6.0.13.
I tried some solution proposed on google (all old 5 years + solution), including
In any case, pear doesn't seem a viable solution. Is there a simple way to update PHPUnit in Xampp?
Actually, it can be updated in three simple steps:
"%PHPBIN%" "C:\xampp\php\phpunit" %*
to : "%PHPBIN%" "C:\xampp\php\phpunit.phar" %
*You don't need to restart apache.
Additional note: In your tests, you will need to replace: phpunit_framework_testcase
by: TestCase
And include: use PHPUnit\Framework\TestCase
at the top of your test files.
Of course, the test suites are still compatible on my production server (centos7, follow the official documentation to update on Linux https://phpunit.de/getting-started.html).
Thanks, Working OK with XAMPP v7.3.7
The latest phpunit.phar can be downloaded from: https://phar.phpunit.de
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With