News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPImpact Blog:
PHPUnit Testing Zend Framework Controllers
December 29, 2008 @ 10:21:37

On the PHP::Impact blog there's a recent post looking at using the popular unit testing PHP framework PHPUnit to test Zend Framework controllers.

Testing a Web application is a complex task, because a Web application is made of several layers of logic. Unit testing a Zend Framework controller can be very difficult, specially for those who are not familiar with the Zend Framework. You can test your action controllers using Zend_Test and/or PHPUnit. Zend_Test allows you to simulate requests, insert test data, inspect your application's output and generally verify your code is doing what it should be doing.

He opts for the second one and includes the directory structure you'll need to set up the tests, an example bootstrap file and a simple controller (AllTests). A simple test example is also included that checks a few things - if its the default action, the first action, parameter names and method names.

0 comments voice your opinion now!
phpunit zendframework test application controller example tuorial


blog comments powered by Disqus

Similar Posts

PHPMaster.com: More Bulletproofing with PHPUnit’s Database Extension

Matthew Weier O'Phinney's Blog: The simplest Zend_Form decorator

Job Posting: National Auto Warranty Seeks PHP Web App Developer (Wentzville, MO)

Padraic Brady's Blog: The Mockery: An Independent Mock Object and Stub Framework for PHP5

Stefan Koopmanschap's Blog: Barcodes and QR codes in PHP


Community Events





Don't see your event here?
Let us know!


deployment zendserver tips symfony introduction list laravel conference community framework language library api developer podcast bugfix series interview release voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework