Skip to content

Commit 329d29e

Browse files
committed
Runner: ignores directory /vendor
1 parent be1d1f6 commit 329d29e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Runner/Runner.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class Runner
2020
/** @var string[] paths to test files/directories */
2121
public $paths = [];
2222

23+
/** @var string[] */
24+
public $ignoreDirs = ['vendor'];
25+
2326
/** @var int run in parallel threads */
2427
public $threadCount = 1;
2528

@@ -164,6 +167,9 @@ private function findTests(string $path): void
164167

165168
if (is_dir($path)) {
166169
foreach (glob(str_replace('[', '[[]', $path) . '/*', GLOB_ONLYDIR) ?: [] as $dir) {
170+
if (in_array(basename($dir), $this->ignoreDirs, true)) {
171+
continue;
172+
}
167173
$this->findTests($dir);
168174
}
169175

0 commit comments

Comments
 (0)