PEAR_TestListener 0.3.0 proposal -- Milestone 2
| From: | Laurent Laville | Date: | Thu, 04 Jun 2009 22:37:56 +0000 |
| Subject: | PEAR_TestListener 0.3.0 proposal -- Milestone 2 | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-51883@lists.php.net to get a copy of this message | ||
Hi all,
I've just finished to test basic PEAR::Log handlers with my new PEAR_TestListener 0.3.0 feature.
Remember yesterday when I wrote :
"...
Imagine you have just to run your test suite with only one command :
php /path/to/unit/test/suite.php --configure xmlfile
..."
The *dream* is now a *reality* :)
Even if you have ability to implement code as explained in my current draft proposal, you can now edit a simple config file to add/remove/use any PEAR::Log handler available.
On the same PHPUnit XML configuration file, you could have now these parameters
<phpunit>
<loggers>
<file ident="f1" name="C:\wamp\bin\php\php5.2.9-2\php.log"
level="info" />
<composite>
<file ident="fic2" />
<null ident="f2" />
<file ident="f2" />
</composite>
<file ident="f2" name="C:\wamp\bin\php\php5.2.9-2\tmp\php.log"
level="warning" />
<null ident="n2" />
</loggers>
</phpunit>
With the composite you define here whate to use :
- a file handler with ident fic2 : DOES NOT match to config (ERROR)
- a null handler with ident f2 : DOES NOT full match to any config handler f2 is for file f2 (ERROR)
- a file handler with ident f2 : MATCH ==> use it
I hope to put the full proposal online Saturday.
I need again to test with additional conf parameters: The param#4 of Log::singleton
But I reached my goal. Hope you'll enjoy it !
Laurent (is happy tonight :o)