News Feed
Sections




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

Blue Parabola Blog:
Getting Started with Zend_Test
January 12, 2010 @ 14:12:41

On the Blue Parabola blog today there's a look at working with the Zend_Test component of the Zend Framework (from Matthew Turland).

I went to the "tests" directory generated for me by the zf CLI utility to get started. What I found there was three files: application/bootstrap.php, library/bootstrap.php, phpunit.xml They were all completely empty, which didn't really provide much in the way of guidance on how to get started. The Zend_Test documentation is good, but was a bit lacking in that area as well; it really only covers how Zend_Test extends the capabilities of PHPUnit.

Matthew walks you through his process of creating a sample PHPUnit XML configuration file (with a little help), updating your bootstrap to load in paths to the test files and the creation of a sample test case for a MySQL database. He runs a test on the database to compare it to a standardized data set based on an XML file (seed.xml). He also looks briefly at testing controllers, some sample code included for this as well.

0 comments voice your opinion now!
zendtest unittest phpunit mysql zendframework


blog comments powered by Disqus

Similar Posts

MaltBlue.com: Zend Form Mastery with Zend Config - Part 1, Custom Filter Paths

Sebastian Bergmann's Blog: Using Bazaar for PHPUnit Development

Evert Pot's Blog: Taking advantage of PHP namespaces with older code

David Abdemoulaie's Blog: bundle-phu - minify, bundle, and compress your js/css in Zend Framework

InfoWorld: Zend readies PHP applications framework


Community Events





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


series voicesoftheelephpant library symfony laravel package podcast deployment install framework zendserver introduction bugfix release api language unittest community interview opinion

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