Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP: How can I tweak PHPUnit to use a different PHP interpreter?

My system has two PHP interpreters. One came bundled with the OS and the other I installed via the XAMPP package. All of my PHP extensions are applied to the XAMPP installation but PHPUnit seems to only run the version of PHP that came with my machine.

Does anybody know of a way I can configure or rebuild PHPUnit so that it uses my XAMPP PHP interpreter exclusively?

like image 283
Thomas Avatar asked Jul 23 '10 03:07

Thomas


Video Answer


1 Answers

Since modifying phpunit file did not work for me because of phar signature errors, I was running phpunit with different php version by calling interpreter explicitly (on Linux):

php7.1 /usr/local/bin/phpunit
php5.6 /usr/local/bin/phpunit

Following the example with XAMPP, full path to php interpreter could be provided:

/Applications/XAMPP/xamppfiles/bin/php /usr/local/bin/phpunit
like image 89
Kirill Kost Avatar answered Oct 26 '22 04:10

Kirill Kost