Featured Post

Google Kraków Open House 2014

In the evening of the last Thursday (2nd October 2014) I was attending Google Kraków Open House 2014, which took place in the office very close to Main Marlet Square, where Googlers (Google’s employees) work. Although there were about 40-60 people invited, there was a selection before the event,...

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.