D
D
DrunkMaster2016-04-23 07:46:10
PHP
DrunkMaster, 2016-04-23 07:46:10

How to install PHPUnit on Debian?

Please do not send to Google, I rummaged everything, they either put it on Windows, or put it in linux with one command and everything works.
I put it under root and I want it to be available to all users.
1. I put phpunit.phar in /usr/local/bin/phpunit
2. I do the command chmod +x phpunit.phar
3. It is necessary to register the path to it in the PATH variable, I googled it, this is done in etc/profile I write there:
2a0433f37be94a96899c2ab4b5aa923e.png
echo $PATH it seems to show everything as it should:
36afc66d581342c3a3ae5aae6c36f5d0.png
As a result, under root and under the user phpunit --version
-bash: phpunit: command not found
But if you specify the full path in the command under root, then everything works:
/usr/local/bin/phpunit/phpunit. phar --version
What am I doing wrong? ))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-04-23
@DrunkMaster

Everything is clearly described in the docs:

$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit
$ phpunit --version
this way the downloaded phpunit.phar becomes phpunit , which is located
in the standard nix path /usr/local/bin .
you did it:
- phpunit.phar is not renamed
- it lies in /usr/local/bin/phpunit/ , not /usr/local/bin/
stump is clear that the system cannot find it and honestly admits it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question