You are here

public function Framework_SuiteTest::testBeforeClassAndAfterClassAnnotations in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/Framework/SuiteTest.php \Framework_SuiteTest::testBeforeClassAndAfterClassAnnotations()

File

vendor/phpunit/phpunit/tests/Framework/SuiteTest.php, line 159

Class

Framework_SuiteTest
@since Class available since Release 2.0.0 @covers PHPUnit_Framework_TestSuite

Code

public function testBeforeClassAndAfterClassAnnotations() {
  $suite = new PHPUnit_Framework_TestSuite('BeforeClassAndAfterClassTest');
  BeforeClassAndAfterClassTest::resetProperties();
  $suite
    ->run($this->result);
  $this
    ->assertEquals(1, BeforeClassAndAfterClassTest::$beforeClassWasRun, '@beforeClass method was not run once for the whole suite.');
  $this
    ->assertEquals(1, BeforeClassAndAfterClassTest::$afterClassWasRun, '@afterClass method was not run once for the whole suite.');
}