Problem installing PHPUnit on Windows using PEAR and without PEAR

I tried to connect to pear.phpunit.de and three other similar connections using PEAR, but could not, due to a connection timeout, after updating the connection also in PEAR, no progress.

Also, I tried installing PHPunit without PEAR by changing @PHPBIN @ in the phpunit.php file and renaming it, then I could not run it as an executable in DOS (chmod does'nt work in DOS, which I followed)

Is there any other easy way to get PHPUnit to work on Windows under a Wamp server? Please answer, all things are hanging on it now.

+3
source share
5 answers

Try:

pear clear-cache
pear update-channels
pear install --alldeps phpunit/PHPUnit

PHPUnit , unit test, phpunit . , php.exe C:\wamp\bin\php\php5.2.11 \, - :

C:\wamp\bin\php\php5.2.11\phpunit.bat
C:\wamp\bin\php\php5.2.11\phpunit
C:\wamp\bin\php\php5.2.11\PEAR\phpunits
+11

, . PHPUnit Windows XP .

PHPUnit

+1
pear config-set temp_dir D:\temp

, dir .

(- % appdata% local temp).

0
0

31 2014 pear.phpunit.de , PHPUnit :

  • -, , "php -version" . , "php.exe" PATH (, "C:\xampp\php" ).
  • "phpunit.phar" https://phar.phpunit.de/phpunit.phar
  • , phpunit ( "C:\phpunit" )
  • "C:\phpunit \" "phpunit.cmd"
  • "phpunit.cmd" , > :

    @php "% ~ dp0\phpunit.phar" % *

  • At this point you should have "phpunit.cmd" and "phpunit.phar" in the section "C: \ phpunit"

  • Go to system variables and edit the PATH variable
  • Add this line to the top of your PATH variable and don't forget the semicolon:

    C: \ PHPUnit;

  • Click “OK” to save the edit, “Open command prompt” and enter “phpunit -version”

0
source

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


All Articles