I have a question regarding the installation and configuration of composer (PHPUnit)

3

I'm doing a project at the Federal Institute of Triangulo Mineiro, about a student control system made in php, so I'm starting a test phase using PHPUnit and I have my doubts because I'm not experienced with this tool. I'm not able to install and configure the composer to run these tests, would anyone give me any tips? The System is in github. follow the > link

Note: I already installed and configured PHPUnit the problem is only in this part of the composer.

If someone has a tip that facilitates this installation and configuration I thank you right away.

    
asked by anonymous 25.05.2016 / 21:31

1 answer

2

All you need to do is create a file named composer.json in the root folder of your project. The contents of the file will be as follows:

{
    "require-dev": {
        "phpunit/phpunit": "dev-master"
    }
}

(PS: this means that the last version of dependency phpunit/phpunit will be installed when we install the project's development dependencies).

Then, with Composer already installed, run:

composer install

When the command finishes, PHPUnit will be installed in the vendor/phpunit folder. To run it, simply run:

vendor/bin/phpunit
    
25.05.2016 / 21:56