How to configure PhpUnit in Xampp?

I have successfully installed PhpUnit in Xampp, now I need to configure it, I need to do the following steps from the documentation:

2. Prepare the phpunit script: 1. Rename the phpunit.PHP  to phpunit. 2. Replace the @ php_bin@ string in it with the path to your PHP command-line interpreter (usually /usr/bin/php). 3. Copy it to a directory that is in your path and make it executable (chmod +x phpunit). 3. Prepare the PHPUnit/Util/PHP.PHP : 1. Replace the @ php_bin@ string in it with the path to your PHP command-line interpreter (usually /usr/bin/php). 

I can not find phpunit.php in the PEAR directory. Any tips on where this file is located on the Xppp PhpUnit installation? Any clues?

Best wishes,


Update1:

I installed it through PEAR. Well, I'll see if this works.

Best wishes,

+2
source share
2 answers

How did you install it? If you use the pear installer that comes with Xampp, it should just work.

 /opt/lampp/bin/pear channel-discover pear.phpunit.de /opt/lampp/bin/pear install phpunit/PHPUnit 

and the executable should then be in / opt / lampp / bin / phpunit.

If you installed it differently (handling the files ?, sry, I did not find other hints in the xampp docs), just point it to me and I will edit the answer

+1
source

I tried to make a summary of all the necessary / useful commands for installing phpunit. Hope this still helps some people who stumbled upon this.

Please note that it is best to run all commands as an administrator.

 php go-pear.phar pear clear-cache pear update-channels pear upgrade --alldeps -f pear channel-discover pear.phpunit.de pear channel-discover pear.symfony-project.com pear channel-discover components.ez.no pear config-set preferred_state beta pear install --onlyreqdeps phpunit/PHPUnit 

Good luck sunny

+1
source

Source: https://habr.com/ru/post/1266268/


All Articles