You are here

public static function SimpletestPhpunitRunCommandTest::setUpBeforeClass in Drupal 8

File

core/modules/simpletest/tests/src/Unit/SimpletestPhpunitRunCommandTest.php, line 50

Class

SimpletestPhpunitRunCommandTest
Tests simpletest_run_phpunit_tests() handles PHPunit fatals correctly.

Namespace

Drupal\Tests\simpletest\Unit

Code

public static function setUpBeforeClass() {
  parent::setUpBeforeClass();

  // Figure out our app root.
  self::$root = dirname(dirname(dirname(dirname(dirname(dirname(__DIR__))))));

  // Include the files we need for tests. The stub test we will run is
  // SimpletestPhpunitRunCommandTestWillDie which is located in
  // simpletest_phpunit_run_command_test.php.
  include_once self::$root . '/core/modules/simpletest/tests/fixtures/simpletest_phpunit_run_command_test.php';

  // Since we're testing simpletest_run_phpunit_tests(), we need to include
  // simpletest.module.
  include_once self::$root . '/core/modules/simpletest/simpletest.module';
}