phpunit is dead (for me)
Rant: I killed the experimental usage if PHPUnit and will rewrite ALL my tests to Simpletest (again).
Why?
I seem way to stupid to follow the guides for test grouping and was not able to get it running. I am very sorry, after some multiple thousand tests in PHP, Python and some in Java it must be possible to use the test runner and all its aspects w.o. getting a degree in informatics. One point may be using a framework with proper error messages:
Catchable fatal error: Argument 1 passed to PHPUnit_Framework_TestSuite::addTest() must implement interface PHPUnit_Framework_Test, string given, called in /home/mruser/public_html/xe2zend/tests/Tpdb/AllTests.php on line 26 and defined in /usr/share/php/PHPUnit/Framework/TestSuite.php on line 234
The test runs out of the box but does not when grouped, the manual has nothing to tell me neither has google ;)
Since Simpletest actually dies w.o. any error message when checking for Exceptions actually, there seems nothing left than cheating a bit with simpletest and use Marcus Bakers trick to test on Exceptions ;) (Thats why i wanted to change to PHPUnit)
function test...() {
try {
// throw here.
} catch (Exception $e) {
}
$this->fail('This should have thrown');
}
OMFG ... thank good its friday (and i have to go to work 2morrow) G*
Why?
I seem way to stupid to follow the guides for test grouping and was not able to get it running. I am very sorry, after some multiple thousand tests in PHP, Python and some in Java it must be possible to use the test runner and all its aspects w.o. getting a degree in informatics. One point may be using a framework with proper error messages:
Catchable fatal error: Argument 1 passed to PHPUnit_Framework_TestSuite::addTest() must implement interface PHPUnit_Framework_Test, string given, called in /home/mruser/public_html/xe2zend/tests/Tpdb/AllTests.php on line 26 and defined in /usr/share/php/PHPUnit/Framework/TestSuite.php on line 234
The test runs out of the box but does not when grouped, the manual has nothing to tell me neither has google ;)
Since Simpletest actually dies w.o. any error message when checking for Exceptions actually, there seems nothing left than cheating a bit with simpletest and use Marcus Bakers trick to test on Exceptions ;) (Thats why i wanted to change to PHPUnit)
function test...() {
try {
// throw here.
} catch (Exception $e) {
}
$this->fail('This should have thrown');
}
OMFG ... thank good its friday (and i have to go to work 2morrow) G*
Comments
No new comments allowed (anymore) on this post.