View on GitHub

PHPUnit Essentials

Just notes while working through this book.

I’m currently forcing myself to TDD everything I right.

Ideally I would be able to get XDebug working with my tests. This will be my first attempt. May not be easy because of my remote desktop stack :-(.

Xdebug is already installed on my dev box.

Remote CLI is missing, created a ticket with JetBrains. Updated PHPStorm and installed all plugins (this seemed to be plugin related). Corected path mappings and debugging is now working!

3 Tests What They’re All About

A test is something which has known inputs, and compares the output with known values. This is an assertion.

  1. Test unexpected inputs as well as expected.
  2. Just test public methods.

** Test class name should mirror the tested class **

Integration testing = how your application reacts with another system.


Unit testing should focus on the model.

Testing Dependencies and Exceptions