You are here

trait StubTestSuiteBaseTrait in Drupal 8

Same name in this branch
  1. 8 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit7/StubTestSuiteBaseTrait.php \Drupal\TestTools\PhpUnitCompatibility\PhpUnit7\StubTestSuiteBaseTrait
  2. 8 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit6/StubTestSuiteBaseTrait.php \Drupal\TestTools\PhpUnitCompatibility\PhpUnit6\StubTestSuiteBaseTrait

Makes Drupal's test API forward compatible with multiple versions of PHPUnit.

Hierarchy

File

core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit6/StubTestSuiteBaseTrait.php, line 8

Namespace

Drupal\TestTools\PhpUnitCompatibility\PhpUnit6
View source
trait StubTestSuiteBaseTrait {

  /**
   * {@inheritdoc}
   */
  public function addTestFiles($filenames) {

    // We stub addTestFiles() because the parent implementation can't deal with
    // vfsStream-based filesystems due to an error in
    // stream_resolve_include_path(). See
    // https://github.com/mikey179/vfsStream/issues/5 Here we just store the
    // test file being added in $this->testFiles.
    $this->testFiles = array_merge($this->testFiles, $filenames);
  }

}

Members