The visibility of the DrupalTest_TestCase::setUp() and DrupalTest_TestCase::tearDown() methods should be protected, so that they are able to be redeclared in child classes, but can also be called from child classes as parent::setUp() and parent::tearDown().
The declaration of these methods in the DrupalTest_TestCase should be changed to match that used in the DrupalTest_TestSuite. Essentially the DrupalTest_TestCase class setUp and tearDown method declarations should look like this:
class DrupalTest_TestCase extends PHPUnit_Framework_TestCase {
protected function setUp() {
parent::setUp();
}
protected function tearDown() {
parent::tearDown();
}
}
Comments
Comment #1
chop commentedI have a patch to change the visibility of the setUp and tearDown methods which can be tested now.
Comment #2
chop commentedThis has been tested and works fine. I've committed the change to HEAD phpunit/lib/DrupalTest/TestCase.php at revision 1.4. I'll see about creating a new non-branch tag that contains this fix soon.