Featured Post

Browse Internet with pleasure

We live in freedom time. Most people spend their lives in free coutries, they can make free choices, do just what they want. The same should be with Internet browsing. We can choose our favourite browser and view webpages we like. The problem is that me and probably most of you had some bad experiences...

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.