Add the possibility to initialize a test suite with a static init() method
authorGunnar Wrobel <wrobel@temple.(none)>
Wed, 10 Feb 2010 08:39:29 +0000 (09:39 +0100)
committerGunnar Wrobel <wrobel@temple.(none)>
Wed, 10 Feb 2010 08:58:49 +0000 (09:58 +0100)
commitc3b52417695d11fd525bddf76ca5af4918a2342e
tree2962377e26dc60f1f063514b85d545a20b053adb
parenta5ac6853fbb3f00bebeeb1fcc31a4f208b52381d
Add the possibility to initialize a test suite with a static init() method
rather than using the main() method.

It is not sufficient to setup the static AllTests class via the main method.
This only allows to directly execute the AllTests.php file by parsing it
with php. Using phpunit is not possible as this will only use the suite()
method to grab the test suite.

It would still be better to use late static binding here but the added
method should be enough to allow running the tests in both ways.

The AllTests.php in Kolab_Session demonstrates how to use the init() method.
framework/Kolab_Session/test/Horde/Kolab/Session/AllTests.php
framework/Test/lib/Horde/Test/AllTests.php