1 | <?php |
||
12 | class TestFinder |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $testsDirectory; |
||
18 | |||
19 | /** |
||
20 | * @var bool |
||
21 | */ |
||
22 | private $changed = false; |
||
23 | |||
24 | /** |
||
25 | * @var Finder |
||
26 | */ |
||
27 | private $finder; |
||
28 | |||
29 | 5 | public function __construct(string $testsDirectory) |
|
33 | |||
34 | public function changed(bool $changed = true) : self |
||
40 | |||
41 | public function filter(string $filter = null) : self |
||
47 | |||
48 | public function contains(string $contains = null) : self |
||
54 | |||
55 | public function notContains(string $notContains = null) : self |
||
61 | |||
62 | 3 | public function inGroup(string $group = null) : self |
|
68 | |||
69 | 3 | public function inGroups(array $groups = []) : self |
|
77 | |||
78 | 1 | public function notInGroup(string $group = null) : self |
|
84 | |||
85 | 1 | public function notInGroups(array $groups = []) : self |
|
93 | |||
94 | public function findTestFilesByFilter(string $filter) : array |
||
100 | |||
101 | 3 | public function findTestFilesInGroups(array $groups) : array |
|
107 | |||
108 | 1 | public function findTestFilesExcludingGroups(array $excludeGroups) : array |
|
114 | |||
115 | 1 | public function findAllTestFiles() : array |
|
119 | |||
120 | public function findChangedTestFiles() : array |
||
126 | |||
127 | public function getFiles() : array |
||
135 | |||
136 | 5 | private function getFinder() : Finder |
|
148 | |||
149 | private function buildFilesArrayFromFinder() : array |
||
155 | |||
156 | private function buildFilesArrayFromFindCommand(string $command) : array |
||
162 | } |
||
163 |