vendredi 24 juin 2016

Execute PHPUnit when is installed as part of a project

I have added composer to a standalone project as:

{
    "require-dev": {
        "phpunit/phpunit": "5.4.*"
    }
}

After I run composer require "phpunit/phpunit=5.4.*" --dev the libraries gets installed under vendor/. I have write a small test case and I put it under tests/CollectionTest.php and I want to run it but ....

# phpunit
bash: phpunit: command not found

# phpunit --bootstrap vendor/autoload.php tests
bash: phpunit: command not found

I have also added this:

~/.composer/vendor/bin/

to ~/.bash_rc file. Did I miss something? How do I execute the test case?

Aucun commentaire:

Enregistrer un commentaire