PHP App Testing

Think: “What am I testing?”

1) Set-up

Instantiate your class

Look for dependencies, are there any that need mocking?

2) Exercise

We test our real objects that need testing,

or mock objects that don’t but are required by SUT (System Under Test)

3) Verify

Real object results

Expectations of mocked objects

4) Tear down

Destroy objects if needed?


The four-phased testing technique explained here: