Skip to content

Commit

Permalink
Runner: ignores directory /vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 20, 2020
1 parent be1d1f6 commit 329d29e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Runner/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class Runner
/** @var string[] paths to test files/directories */
public $paths = [];

/** @var string[] */
public $ignoreDirs = ['vendor'];

/** @var int run in parallel threads */
public $threadCount = 1;

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

if (is_dir($path)) {
foreach (glob(str_replace('[', '[[]', $path) . '/*', GLOB_ONLYDIR) ?: [] as $dir) {
if (in_array(basename($dir), $this->ignoreDirs, true)) {
continue;
}
$this->findTests($dir);
}

Expand Down

0 comments on commit 329d29e

Please sign in to comment.