8 Dec 2009 16:15
9 Dec 2009 18:54
Re: Customize phpunit output
Ionut G. Stan <ionut.g.stan <at> gmail.com>
2009-12-09 17:54:14 GMT
2009-12-09 17:54:14 GMT
Hi, The most simple way, in my opinion, is to extend PHPUnit_TextUI_Command, override PHPUnit_TextUI_Command::main() and then use this new class in the PHPUnit executable. PHPUnit_TextUI_Command2::main() will be the place where you'll instantiate your custom printer. I've attached the files I used to test this idea. I believe you'll know where to place each one of them. Anyway, the class files should be in the include_path and the phpunit executable should be replaced. After that, just run some unit tests and you'll see something like this in the output: F:\projects\php\php-utils\tests>phpunit PHPUnit 3.4.2 by Sebastian Bergmann. ......................................................F ----------------------------------------------------- Custom PHPUnit printer ----------------------------------------------------- On 12/8/2009 5:15 PM, Mathieu Suen wrote: > Hi, > > I would like to customize the output of phpunit. > One way could be to make a subclass of PHPUnit_TexUI_ResultPrinter but(Continue reading)
RSS Feed