final class CoreExtensionsUnitTestSuite in Drupal driver for SQL Server and SQL Azure 4.2.x
Same name and namespace in other branches
- 3.0.x dev/travis/TestSuites/CoreExtensionsUnitTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreExtensionsUnitTestSuite
- 3.1.x dev/travis/TestSuites/CoreExtensionsUnitTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreExtensionsUnitTestSuite
- 4.0.x dev/travis/TestSuites/CoreExtensionsUnitTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreExtensionsUnitTestSuite
- 4.1.x dev/TestSuites/CoreExtensionsUnitTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreExtensionsUnitTestSuite
Discovers tests for the kernel test suite.
Hierarchy
- class \Drupal\Tests\sqlsrv\TestSuites\TestSuiteBase extends \PHPUnit\Framework\TestSuite
- class \Drupal\Tests\sqlsrv\TestSuites\CoreExtensionsUnitTestSuite
Expanded class hierarchy of CoreExtensionsUnitTestSuite
File
- dev/
TestSuites/ CoreExtensionsUnitTestSuite.php, line 12
Namespace
Drupal\Tests\sqlsrv\TestSuitesView source
final class CoreExtensionsUnitTestSuite extends TestSuiteBase {
/**
* Factory method which loads up a suite with all kernel tests.
*
* @return static
* The test suite.
*/
public static function suite() {
$root = self::getDrupalRoot();
$suite = new static('unit');
$suite
->addExtensionTestsBySuiteNamespace($root, 'Unit', '');
return $suite;
}
/**
* {@inheritdoc}
*/
protected function addExtensionTestsBySuiteNamespace($root, $suite_namespace, $pattern) {
foreach ($this
->findExtensionDirectories($root) as $extension_name => $dir) {
$test_path = "{$dir}/tests/src/{$suite_namespace}";
if (is_dir($test_path)) {
$this
->addTestFiles(TestDiscovery::scanDirectory("Drupal\\Tests\\{$extension_name}\\{$suite_namespace}\\", $test_path));
}
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CoreExtensionsUnitTestSuite:: |
protected | function |
Find and add tests to the suite for core and any extensions. Overrides TestSuiteBase:: |
|
CoreExtensionsUnitTestSuite:: |
public static | function | Factory method which loads up a suite with all kernel tests. | |
TestSuiteBase:: |
protected | property | The failing test files. | |
TestSuiteBase:: |
protected | function | Find and add tests to the suite for core and any extensions. | |
TestSuiteBase:: |
protected | function | Find and add tests to the suite for core and any extensions. | |
TestSuiteBase:: |
protected | function | Finds extensions in a Drupal installation. | |
TestSuiteBase:: |
public static | function | Fetch a subset of the Core Extension tests. | |
TestSuiteBase:: |
protected static | function | Get the path to webroot. |