HTTPS SSH

PHPUnit-Koans

PHP Testing Koans to understand how to write unit tests with PHPUnit.

Dependencies

This is a Composer project.

Additional exercises cover Hamcrest matchers. Run composer install to install the required dependencies.

Assignment

  • Run tests with phpunit (or vendor/bin/phpunit).
  • You should see some test failures and errors (but there are no assertions).
  • Go through the test code starting from Session 1:
    • All assertions are commented and incomplete.
    • Uncomment the assertions and complete them making the tests pass.
    • You can run individual sessions using phpunit test/Session1_GreeterTest.php.

License

New BSD License, see license.txt in repository.