You are here

protected function GoodUnitTest::getTestFiles in Coder 8.2

Same name in this branch
  1. 8.2 coder_sniffer/DrupalPractice/Test/good/GoodUnitTest.php \DrupalPractice\good\GoodUnitTest::getTestFiles()
  2. 8.2 coder_sniffer/Drupal/Test/good/GoodUnitTest.php \Drupal\good\GoodUnitTest::getTestFiles()

Returns a list of test files that should be checked.

Return value

array The list of test files.

Overrides CoderSniffUnitTest::getTestFiles

File

coder_sniffer/Drupal/Test/good/GoodUnitTest.php, line 51

Class

GoodUnitTest
Unit test class for all good files that must not throw errors/warnings.

Namespace

Drupal\good

Code

protected function getTestFiles($testFileBase) {
  $dir = dirname(__FILE__);
  $di = new \DirectoryIterator($dir);
  foreach ($di as $file) {
    $path = $file
      ->getPathname();
    if ($path !== __FILE__ && $file
      ->isFile()) {
      $testFiles[] = $path;
    }
  }

  // Get them in order.
  sort($testFiles);
  return $testFiles;
}