A
A
alex4answ2019-08-03 10:59:13
PHP
alex4answ, 2019-08-03 10:59:13

How to properly install phpunit?

Hello, I can't install phpunit.
1. Downloaded phpunit.phar
2. Put it in the right folder
3. Set the Path environment variable to the full path to phpunit.phar.
4. I rebooted the computer
, I do it on the command line:

phpunit --version, - не является внутренней или внешней командой...

I open through the command line in the folder:
php phpunit.phar --version- everything works. but I can’t run the test, because phpunit itself doesn’t find the classes.
I don’t understand something at all, I’m already confused, I couldn’t find a normal tutorial where everything is laid out on the shelves, they skip the installation part everywhere.
It seems to me that it’s not convenient through composer, since you have to write a long way to phpunit itself.
Please tell me how to install everything?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Matveev, 2019-08-05
@ematveev

a .phar file is not a Windows executable, so it won't work on the command line:
phpunit --version

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question