final class CoreKernelTestSuite in Drupal driver for SQL Server and SQL Azure 3.0.x
Same name in this branch
- 3.0.x dev/appveyor/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
- 3.0.x dev/travis/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
Same name and namespace in other branches
- 4.2.x dev/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
- 3.1.x dev/appveyor/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
- 3.1.x dev/travis/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
- 4.0.x dev/appveyor/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
- 4.0.x dev/travis/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
- 4.1.x dev/TestSuites/CoreKernelTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite
Discovers tests for the kernel test suite.
Hierarchy
- class \Drupal\Tests\sqlsrv\TestSuites\CoreKernelTestSuite extends \Drupal\Tests\sqlsrv\TestSuites\TestSuiteBase
Expanded class hierarchy of CoreKernelTestSuite
File
- dev/
travis/ TestSuites/ CoreKernelTestSuite.php, line 12
Namespace
Drupal\Tests\sqlsrv\TestSuitesView source
final class CoreKernelTestSuite extends TestSuiteBase {
/**
* Factory method which loads up a suite with all core kernel tests.
*
* @return static
* The test suite.
*/
public static function suite() {
$root = dirname(__DIR__, 6);
$suite = new static('kernel');
$suite
->addCoreKernelTests($root);
return $suite;
}
/**
* Find and add tests to the suite for core and any extensions.
*
* @param string $root
* Path to the root of the Drupal installation.
*/
protected function addCoreKernelTests($root) {
$failing_classes = [];
foreach ($this->failingClasses as $failing_class) {
$failing_classes[] = $root . $failing_class;
}
// Core's Kernel tests are in the namespace Drupal\KernelTests\ and are
// always inside of core/tests/Drupal/KernelTests.
$passing_tests = [];
$tests = TestDiscovery::scanDirectory("Drupal\\KernelTests\\", "{$root}/core/tests/Drupal/KernelTests");
foreach ($tests as $test) {
if (!in_array($test, $failing_classes)) {
$passing_tests[] = $test;
}
}
$this
->addTestFiles($passing_tests);
}
/**
* Find and add tests to the suite for core and any extensions.
*
* @param string $root
* Path to the root of the Drupal installation.
* @param string $suite_namespace
* SubNamespace used to separate test suite. Examples: Unit, Functional.
* @param string $pattern
* REGEXP pattern to apply to file name.
*/
protected function addExtensionTestsBySuiteNamespace($root, $suite_namespace, $pattern) {
// Do nothing.
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CoreKernelTestSuite:: |
protected | function | Find and add tests to the suite for core and any extensions. | |
CoreKernelTestSuite:: |
protected | function | Find and add tests to the suite for core and any extensions. | |
CoreKernelTestSuite:: |
public static | function | Factory method which loads up a suite with all core kernel tests. |