protected function BadUnitTest::getTestFiles in Coder 8.3.x
Same name and namespace in other branches
- 8.3 tests/Drupal/bad/BadUnitTest.php \Drupal\Test\bad\BadUnitTest::getTestFiles()
Returns a list of test files that should be checked.
Parameters
string $testFileBase The base path that the unit tests files will have.:
Return value
array<string>
Overrides CoderSniffUnitTest::getTestFiles
File
- tests/
Drupal/ bad/ BadUnitTest.php, line 445
Class
- BadUnitTest
- Unit test class for all bad files.
Namespace
Drupal\Test\badCode
protected function getTestFiles($testFileBase) : array {
$di = new \DirectoryIterator(__DIR__);
$testFiles = [];
foreach ($di as $file) {
$path = $file
->getPathname();
if ($path !== __FILE__ && $file
->isFile() === true && preg_match('/\\.fixed$/', $path) !== 1) {
$testFiles[] = $path;
}
}
// Get them in order.
sort($testFiles);
return $testFiles;
}