PEAR_RunTest integration in PHPUnit 3.1.4
| From: | Sebastian Bergmann | Date: | Mon, 23 Jul 2007 08:30:02 +0000 |
| Subject: | PEAR_RunTest integration in PHPUnit 3.1.4 | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-47668@lists.php.net to get a copy of this message | ||
Hi!
As requested from the PEAR community, there is now support for .phpt
tests in PHPUnit 3.1.4 [1] by means of integrating PEAR_RunTest.
The following example will create a TestCase for a single .phpt file:
<?php
require_once 'PHPUnit/Extensions/PhptTestCase.php';
$test = new PHPUnit_Extensions_PhptTestCase('/path/to/test.phpt');
?>
The following example will traverse the given directory, collect all
.phpt files, and add them to a TestSuite:
<?php
require_once 'PHPUnit/Extensions/PhptTestSuite.php';
$suite = new PHPUnit_Extensions_PhptTestSuite('/path/to/tests');
?>
Cheers,
Sebastian
--
[1] http://www.phpunit.de/wiki/ChangeLog#PHPUnit3.1.423-Jul-2007
--
Sebastian Bergmann http://sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69