10 parent::__construct();
15 foreach ( $registry->getAllThings() as $info ) {
16 $paths[] = dirname( $info[
'path'] ) .
'/tests/phpunit';
19 Hooks::run(
'UnitTestsList', [ &$paths ] );
20 foreach ( array_unique( $paths ) as $path ) {
21 if ( is_dir( $path ) ) {
24 $suffixes = [
'Test.php' ];
25 $fileIterator =
new File_Iterator_Facade();
26 $matchingFiles = $fileIterator->getFilesAsArray( $path, $suffixes );
27 $this->addTestFiles( $matchingFiles );
28 } elseif ( file_exists( $path ) ) {
30 $this->addTestFile( $path );