You are here

protected function Drupal_BadUnitTest::getTestFiles in Coder 7.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/Test/bad/BadUnitTest.php, line 430

Class

Drupal_BadUnitTest
Unit test class for all bad files.

Code

protected function getTestFiles() {
  $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;
}