protected function GoodUnitTest::getTestFiles in Coder 8.2
Same name in this branch
- 8.2 coder_sniffer/DrupalPractice/Test/good/GoodUnitTest.php \DrupalPractice\good\GoodUnitTest::getTestFiles()
- 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\goodCode
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;
}