You are here

protected function BadUnitTest::getTestFiles in Coder 8.2

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/bad/BadUnitTest.php, line 436

Class

BadUnitTest
Unit test class for all bad files.

Namespace

Drupal\bad

Code

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

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