function PhpUnitTestDiscovery::instance

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Test/PhpUnitTestDiscovery.php \Drupal\Core\Test\PhpUnitTestDiscovery::instance()

Returns the singleton instance.

File

core/lib/Drupal/Core/Test/PhpUnitTestDiscovery.php, line 78

Class

PhpUnitTestDiscovery
Discovers available tests using the PHPUnit API.

Namespace

Drupal\Core\Test

Code

public static function instance() : self {
  if (self::$instance === NULL) {
    self::$instance = new self();
  }
  return self::$instance;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.