Featured Post

Review of the book: Zend Framework 2 Application Development from Pack

Review of the book: Zend Framework 2 Application Development from Packt Publishing, written by Christopher Valles. At the beginning of this review I would like to say that it is my second book about Zend Framework 2. This gives me a bigger picture and I could compare this book with the previous one. What...

Read More

Unit testing in Zend Framework 2

Posted by Tomasz Kuter | Posted in Programming, Web development | Posted on 07-04-2013

Tags: , , , , , , , , ,

3

Overview

Today I would like to focus on the unit testing in applications made with Zend Framework 2 and Doctrine 2 ORM. Sample unit tests were included with Zend Framework 1.x and they are also attached to Zend Framework 2 Tutorial.

Important is, that we have two approaches of testing controllers for the latest version of the framework:

  • first, based on class PHPUnit_Framework_TestCase,
  • and the second, which uses AbstractHttpControllerTestCase class.