You are here

final class FailingTestsTestSuite in Drupal driver for SQL Server and SQL Azure 3.0.x

Same name and namespace in other branches
  1. 4.2.x dev/TestSuites/FailingTestsTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\FailingTestsTestSuite
  2. 3.1.x dev/travis/TestSuites/FailingTestsTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\FailingTestsTestSuite
  3. 4.0.x dev/travis/TestSuites/FailingTestsTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\FailingTestsTestSuite
  4. 4.1.x dev/TestSuites/FailingTestsTestSuite.php \Drupal\Tests\sqlsrv\TestSuites\FailingTestsTestSuite

Discovers tests for the kernel test suite.

Hierarchy

  • class \Drupal\Tests\sqlsrv\TestSuites\FailingTestsTestSuite extends \Drupal\Tests\sqlsrv\TestSuites\TestSuiteBase

Expanded class hierarchy of FailingTestsTestSuite

File

dev/travis/TestSuites/FailingTestsTestSuite.php, line 10

Namespace

Drupal\Tests\sqlsrv\TestSuites
View source
final class FailingTestsTestSuite 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
      ->addFailingTests($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 addFailingTests($root) {
    $failing_classes = [];
    foreach ($this->failingClasses as $failing_class) {
      $filename = $root . $failing_class;
      if (file_exists($filename)) {
        $failing_classes[] = $filename;
      }
    }
    $this
      ->addTestFiles($failing_classes);
  }

  /**
   * 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

Namesort descending Modifiers Type Description Overrides
FailingTestsTestSuite::addExtensionTestsBySuiteNamespace protected function Find and add tests to the suite for core and any extensions.
FailingTestsTestSuite::addFailingTests protected function Find and add tests to the suite for core and any extensions.
FailingTestsTestSuite::suite public static function Factory method which loads up a suite with all core kernel tests.