sebastianbergmann/phpunit-selenium — Issue #83: setUpBeforeClass() and tearDownAfterClass didn't run
Author: emaks
Created: 2012-01-10 16:15:53+00:00
State: open

setUpBeforeClass() and tearDownAfterClass didn't run if extends test class from PHPUnit/Extensions/SeleniumTestCase

test:

class TemplateMethodsTest extends PHPUnit_Extensions_SeleniumTestCase
{
public static function setUpBeforeClass()
{
print __METHOD__ . "\n";
}

protected function setUp()
{
$this->setBrowser("*firefox");
$this->setBrowserUrl("http://localhost");
print __METHOD__ . "\n";
}

protected function assertPreConditions()
{
print __METHOD__ . "\n";
}

public function testOne()
{
print __METHOD__ . "\n";
$this->assertTrue(TRUE);
}

protected function assertPostConditions()
{
print __METHOD__ . "\n";
}

protected function tearDown()
{
print __METHOD__ . "\n";
}

public static function tearDownAfterClass()
{
print __METHOD__ . "\n";
}
}

result:
PHPUnit 3.6.7 by Sebastian Bergmann.

TemplateMethodsTest::setUp
TemplateMethodsTest::assertPreConditions
TemplateMethodsTest::testOne
TemplateMethodsTest::assertPostConditions
TemplateMethodsTest::tearDown

Time: 20 seconds, Memory: 5.75Mb

OK (1 test, 1 assertion)

Process finished with exit code 0