cvs: pear / AllTests.php
| From: | Christian Weiske | Date: | Thu, 05 Jul 2007 05:59:59 +0000 |
| Subject: | cvs: pear / AllTests.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-47859@lists.php.net to get a copy of this message | ||
cweiske Thu Jul 5 05:59:59 2007 UTC
Modified files:
/pear AllTests.php
Log:
Add description how it works
http://cvs.php.net/viewvc.cgi/pear/AllTests.php?r1=1.9&r2=1.10&diff_format=u
Index: pear/AllTests.php
diff -u pear/AllTests.php:1.9 pear/AllTests.php:1.10
--- pear/AllTests.php:1.9 Thu Jul 5 05:13:47 2007
+++ pear/AllTests.php Thu Jul 5 05:59:59 2007
@@ -15,7 +15,35 @@
/**
* pear-wide unit tests
* Automatically detects packagename/tests/AllTests.php
-* and adds them to the list
+* and adds them to the list.
+*
+* Goals:
+* - Run this file to unit-test all pear packages and get
+* a combined coverage report
+* - Tests need to be runnable *without* installing any package
+* - Dependencies need to work
+*
+* How it is done:
+* - To make dependencies work without installing any package, this script
+* modifies the include path to contains every package directory.
+* - Further, because not all packages have proper directory structures that
+* emulate the structure after installation, this script creates symlinks
+* of the missing directory names to the package directories.
+* This causes the script to work on *nix only, but there is no other way
+* to get it working.
+* - A package's tests/ directory is expected to contain an AllTests.php file
+* that contains a test suite class as described in [1,2]
+* - The AllTests.php class name has to be "Package_Name_AllTests"
+* - Your test scripts may not make any assumptions about the current directory.
+* "chdir(dirname(__FILE__))" before including your test cases.
+*
+* Daily updated tests results are available on [3].
+*
+*
+* [1] http://www.phpunit.de/pocket_guide/3.1/en/organizing-test-suites.html
+* Framework_AllTests class
+* [2] http://cvs.php.net/viewvc.cgi/pear/Net_Wifi/tests/AllTests.php?view=markup
+* [3] http://pear.cweiske.de/unittests-cvs/
*/
class PEAR_AllTests
{