| Conditions | 6 | 
| Paths | 8 | 
| Total Lines | 24 | 
| Code Lines | 19 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 17 |   public function getSuits(string $folder): array { | ||
| 18 | $suits = []; | ||
| 19 | $robot = new RobotLoader(); | ||
| 20 | $tempDir = "$folder/temp/cache/Robot.Loader"; | ||
| 21 |     if(is_dir("$folder/_temp")) { | ||
| 22 | $tempDir = "$folder/_temp/cache/Robot.Loader"; | ||
| 23 | } | ||
| 24 | FileSystem::createDir($tempDir); | ||
| 25 | $robot->setTempDirectory($tempDir); | ||
| 26 | $robot->addDirectory($folder); | ||
| 27 | $robot->acceptFiles = ["*Test.php", "*.phpt", ]; | ||
| 28 | $robot->rebuild(); | ||
| 29 | $robot->register(); | ||
| 30 | $classes = $robot->getIndexedClasses(); | ||
| 31 |     foreach($classes as $class => $file) { | ||
| 32 |       if(!class_exists($class)) { | ||
| 33 | continue; | ||
| 34 | } | ||
| 35 | $rc = new ReflectionClass($class); | ||
| 36 |       if(!$rc->isAbstract() && $rc->isSubclassOf(TestCase::class)) { | ||
| 37 | $suits[] = [$rc->getName(), $file]; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | return $suits; | ||
| 41 | } | ||
| 43 | ?> |