You are here

public function RecursiveExtensionFilterIterator::acceptTests in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php \Drupal\Core\Extension\Discovery\RecursiveExtensionFilterIterator::acceptTests()
  2. 9 core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php \Drupal\Core\Extension\Discovery\RecursiveExtensionFilterIterator::acceptTests()

Controls whether test directories will be scanned.

Parameters

bool $flag: Pass FALSE to skip all test directories in the discovery. If TRUE, extensions in test directories will be discovered and only the global directory skip list in RecursiveExtensionFilterIterator::$skippedFolders is applied.

File

core/lib/Drupal/Core/Extension/Discovery/RecursiveExtensionFilterIterator.php, line 108

Class

RecursiveExtensionFilterIterator
Filters a RecursiveDirectoryIterator to discover extensions.

Namespace

Drupal\Core\Extension\Discovery

Code

public function acceptTests($flag = FALSE) {
  $this->acceptTests = $flag;
  if (!$this->acceptTests) {
    $this->skippedFolders[] = 'tests';
  }
}