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) |
|
39 | |||
40 | public function changed(bool $changed = true) : self |
||
46 | |||
47 | public function filter(string $filter = null) : self |
||
53 | |||
54 | public function contains(string $contains = null) : self |
||
60 | |||
61 | public function notContains(string $notContains = null) : self |
||
67 | |||
68 | 3 | public function inGroup(string $group = null) : self |
|
74 | |||
75 | 3 | public function inGroups(array $groups = []) : self |
|
83 | |||
84 | 1 | public function notInGroup(string $group = null) : self |
|
90 | |||
91 | 1 | public function notInGroups(array $groups = []) : self |
|
99 | |||
100 | public function findTestFilesByFilter(string $filter) : array |
||
106 | |||
107 | 3 | public function findTestFilesInGroups(array $groups) : array |
|
113 | |||
114 | 1 | public function findTestFilesExcludingGroups(array $excludeGroups) : array |
|
120 | |||
121 | 1 | public function findAllTestFiles() : array |
|
125 | |||
126 | public function findChangedTestFiles() : array |
||
132 | |||
133 | public function getFiles() : array |
||
141 | |||
142 | private function buildFilesArrayFromFinder() : array |
||
148 | |||
149 | private function buildFilesArrayFromFindCommand(string $command) : array |
||
155 | } |
||
156 |