StubTestSuiteBaseTrait.php 645 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Drupal\TestTools\PhpUnitCompatibility\PhpUnit7;
  3. /**
  4. * Makes Drupal's test API forward compatible with multiple versions of PHPUnit.
  5. */
  6. trait StubTestSuiteBaseTrait {
  7. /**
  8. * {@inheritdoc}
  9. */
  10. public function addTestFiles($filenames): void {
  11. // We stub addTestFiles() because the parent implementation can't deal with
  12. // vfsStream-based filesystems due to an error in
  13. // stream_resolve_include_path(). See
  14. // https://github.com/mikey179/vfsStream/issues/5 Here we just store the
  15. // test file being added in $this->testFiles.
  16. $this->testFiles = array_merge($this->testFiles, $filenames);
  17. }
  18. }