You are here

protected function SimpletestPhpunitRunCommandTest::setUp in SimpleTest 8.3

File

tests/src/Unit/SimpletestPhpunitRunCommandTest.php, line 66

Class

SimpletestPhpunitRunCommandTest
Tests simpletest_run_phpunit_tests() handles PHPunit fatals correctly.

Namespace

Drupal\Tests\simpletest\Unit

Code

protected function setUp() {
  parent::setUp();

  // Organize our mock container.
  $container = new ContainerBuilder();
  $container
    ->set('app.root', self::$root);
  $file_system = $this
    ->prophesize(FileSystemInterface::class);

  // The simpletest directory wrapper will always point to /tmp.
  $file_system
    ->realpath('public://simpletest')
    ->willReturn(sys_get_temp_dir());
  $container
    ->set('file_system', $file_system
    ->reveal());
  \Drupal::setContainer($container);
  $this->fixtureContainer = $container;
}