Skip to content

Commit 4457338

Browse files
authored
Merge pull request #37 from thejanasatan/exlude-vendor
Allow configuring an exclude path in SplitTestsByGroup
2 parents ddf9ceb + 02ee512 commit 4457338

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/SplitTestsByGroups.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ abstract class TestsSplitter extends BaseTask
2626
protected $projectRoot = '.';
2727
protected $testsFrom = 'tests';
2828
protected $saveTo = 'tests/_data/paracept_';
29+
protected $excludePath = 'vendor';
2930

3031
public function __construct($groups)
3132
{
@@ -52,6 +53,13 @@ public function groupsTo($pattern)
5253

5354
return $this;
5455
}
56+
57+
public function excludePath($path)
58+
{
59+
$this->excludePath = $path;
60+
61+
return $this;
62+
}
5563
}
5664

5765
/**
@@ -123,7 +131,8 @@ public function run()
123131
->name('*Test.php')
124132
->name('*.feature')
125133
->path($this->testsFrom)
126-
->in($this->projectRoot ? $this->projectRoot : getcwd());
134+
->in($this->projectRoot ? $this->projectRoot : getcwd())
135+
->exclude($this->excludePath);
127136

128137
$i = 0;
129138
$groups = [];

0 commit comments

Comments
 (0)