A simple PHP project to learn the basic of TDD with phpunit
The goal is to build Class called Calc and test it with phpunit
You have to implement the classes and pass into all tests.
- create class named Calc
- implement Calc::soma
- implement Calc::subtracao
- implement testCalc
- git
- php
- composer
- phpunit
- php-xdebug
Install requiriments
sudo apt-get install git php7.2 composer phpunit php-xdebug
To instal:
git clone https://github.com/pabloaugusto/phpunit-tutorial
cd phpunit-tutorial
composer install
Run the tests with command:
cd phpunit-tutorial
./vendor/bin/phpunit
or, if you have phpunit at your path:link-github-issues
cd phpunit-tutorial
phpunit