News Feed
Sections




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

Volker Dusch's Blog:
Creating your custom PHPUnit output formats
January 20, 2011 @ 08:36:00

Volker Dusch has a new post to his blog today talking about PHPUnit and how you can make custom output formats to get the results exactly how you need them. The trick is in using XSLT for transformation.

While tackling with someones question i decided it's time to play around with xslt for learning purposes and i found something useful to do. He wanted to extend the --testdox-html output and i proposed to just transform phpunits xml output using an xslt since i didn't see a easy way to prove a custom implemenation for PHPUnit/Util/TestDox/ResultPrinter/HTML.php and i didn't want to change the file its self.

He gives an example of how to use the textdox output method to generate an XML document of the unit test run's results and a simple XSLT style sheet to format the results as a custom HTML page. He uses the "xsltproc" command line tool to make the translation happen.

0 comments voice your opinion now!
phpunit textdox xml xslt convert output format


blog comments powered by Disqus

Similar Posts

Arul Pradad's Blog: Saving XML from Flash, using PHP

Matthew Weier O'Phinney's Blog: Converting DocBook4 to DocBook5

Padraic Brady's Blog: Mocks, Stubs, And SimpleTest Wins

Lorna Mitchell's Blog: PHPUnit with Zend_Controller_Action_Helper

Codewalkers.com: Book Raffle - Pro PHP XML and Web Services


Community Events

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


laravel list yii2 symfony introduction composer conference php7 example api part2 project interview podcast community application opinion framework language series

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