class StubTestSuiteBase
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php \Drupal\Tests\Core\Test\StubTestSuiteBase
- 10 core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php \Drupal\Tests\Core\Test\StubTestSuiteBase
Stub subclass of TestSuiteBase.
We use this class to alter the behavior of TestSuiteBase so it can be testable.
Hierarchy
- class \Drupal\Tests\TestSuites\TestSuiteBase extends \PHPUnit\Framework\TestSuite
- class \Drupal\Tests\Core\Test\StubTestSuiteBase extends \Drupal\Tests\TestSuites\TestSuiteBase uses \Drupal\Tests\Core\Test\PhpunitVersionDependentStubTestSuiteBaseTrait
Expanded class hierarchy of StubTestSuiteBase
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ TestSuiteBaseTest.php, line 129
Namespace
Drupal\Tests\Core\TestView source
class StubTestSuiteBase extends TestSuiteBase {
use PhpunitVersionDependentStubTestSuiteBaseTrait;
/**
* Test files discovered by addTestsBySuiteNamespace().
*
* @var string[]
*/
public $testFiles = [];
/**
* {@inheritdoc}
*/
protected function findExtensionDirectories($root) {
// We have to stub findExtensionDirectories() because we can't inject a
// vfsStream filesystem into drupal_phpunit_find_extension_directories(),
// which uses \SplFileInfo->getRealPath(). getRealPath() resolves
// stream-based paths to an empty string. See
// https://github.com/mikey179/vfsStream/wiki/Known-Issues
return [];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
StubTestSuiteBase::$testFiles | public | property | Test files discovered by addTestsBySuiteNamespace(). | |
StubTestSuiteBase::findExtensionDirectories | protected | function | Finds extensions in a Drupal installation. | Overrides TestSuiteBase::findExtensionDirectories |
TestSuiteBase::addTestsBySuiteNamespace | protected | function | Find and add tests to the suite for core and any extensions. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.