PHPUnit: Basics of Unit Testing

What is Unit Testing ? Unit Testing is a software testing method by which individual units of code are tested to determine if they are fit to use. Benefits of Unit Testing - find problems early - facilitates changes - simplifies integration - documentation - design interface What is PHPUnit? - xUnit-style library by Sebastian Bergmann - Installable via Composer, PEAR and Phar - well integrated and well documented reference: http://phpunit.de/manual/current/en/index.html Installation (globally via Phar) wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar mv phpunit.phar /usr/bin/phpunit source: http://phpunit.de/manual/current/en/installation.html Installation (as vendor via Composer) Create a composer.json file in the root directory then add the ff.: { "require-dev" : { "phpunit/phpunit" : "4.8.0" }, "autoload" : { "psr-4" : { "Project\\" : "app...