News Feed
Sections




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

Giorgio Sironi's Blog:
PHPUnit and Phing cohabitation
December 09, 2009 @ 09:15:21

If you already have a set of unit tests (PHPUnit) and are thinking of implementing a build tool like Phing, you might want to check out this new post from Giorgio Sironi about combining the two with a simple addition to your build configuration.

Integrating these two tools means giving Phing access to a PHPUnit test suite and letting the Phing build files, which manage configuration, contain also information on how to run the test suite. In the build.xml file of an application you should find different targets like generate-documentation, test-all, compile-all (if php were a compiled language), and so on.

He mentions the two ways you can run your unit tests - one being more native (a phpunit task) and the other a bit more "blind" (exec task). He looks at the first, allowing tighter integration with Phing and can actually break the build if something fails. He includes the XML for both to include in the build file and a brief explanation of what they're doing behind the scenes.

0 comments voice your opinion now!
build phing phpunit unittest tutorial


blog comments powered by Disqus

Similar Posts

Rob Allen: Implementing a ZF2 development mode

Content with Style Blog: A caching pattern for models

Zend Developer Zone: Installing PHP4 and PHP5 Concurrently on One WinXP Computer

PHPMag.ru: Zend Framework: models auto-loading

Tim Koschuetzki's Blog: How To Transform HTML To Textile Markup - The CakePHP TextileHelper Revisite


Community Events





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


install developer opinion threedevsandamaybe introduction list testing community symfony2 code language refactor series unittest interview laravel framework release api podcast

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