@@ -37,11 +37,8 @@ class Files
37
37
/** @var string regex for test directories in tools */
38
38
protected $ toolsTestDirs = '#dev/tools/Magento/Tools/[ \\w]+/Test# ' ;
39
39
40
- /** @var string regex for test directories in framework */
41
- protected $ frameworkTestDirs = '#lib/internal/Magento/Framework/[ \\w]+/Test# ' ;
42
-
43
40
/** @var string regex for test directories in lib/internal */
44
- protected $ libTestDirs = '#lib/internal/[ \\w]+/[ \\w]+/Test# ' ;
41
+ protected $ libTestDirs = '#lib/internal/[ \\w]+/[ \\w]+/([ \\ w]+/)? Test# ' ;
45
42
46
43
/**
47
44
* Setter for an instance of self
@@ -132,12 +129,11 @@ public function getPhpFiles($appCode = true, $otherCode = true, $templates = tru
132
129
);
133
130
}
134
131
if ($ otherCode ) {
135
- $ exclude = [$ this ->libTestDirs , $ this ->frameworkTestDirs ];
136
132
$ files = array_merge (
137
133
$ files ,
138
134
glob ($ this ->_path . '/*.php ' , GLOB_NOSORT ),
139
135
glob ($ this ->_path . '/pub/*.php ' , GLOB_NOSORT ),
140
- $ this ->getFilesSubset (["{$ this ->_path }/lib/internal/Magento " ], '*.php ' , $ exclude ),
136
+ $ this ->getFilesSubset (["{$ this ->_path }/lib/internal/Magento " ], '*.php ' , $ this -> libTestDirs ),
141
137
self ::getFiles (["{$ this ->_path }/dev/tools/Magento/Tools/SampleData " ], '*.php ' )
142
138
);
143
139
}
@@ -184,7 +180,7 @@ public function getClassFiles(
184
180
"{$ this ->_path }/dev/tests " ,
185
181
"{$ this ->_path }/app/code/*/*/Test " ,
186
182
"{$ this ->_path }/lib/internal/*/*/Test " ,
187
- "{$ this ->_path }/lib/internal/Magento/Framework /*/Test " ,
183
+ "{$ this ->_path }/lib/internal/*/* /*/Test " ,
188
184
"{$ this ->_path }/dev/tools/Magento/Tools/*/Test " ,
189
185
"{$ this ->_path }/setup/src/Magento/Setup/Test " ,
190
186
@@ -198,10 +194,9 @@ public function getClassFiles(
198
194
);
199
195
}
200
196
if ($ lib ) {
201
- $ exclude = [$ this ->libTestDirs , $ this ->frameworkTestDirs ];
202
197
$ files = array_merge (
203
198
$ files ,
204
- $ this ->getFilesSubset (["{$ this ->_path }/lib/internal/Magento " ], '*.php ' , $ exclude )
199
+ $ this ->getFilesSubset (["{$ this ->_path }/lib/internal/Magento " ], '*.php ' , $ this -> libTestDirs )
205
200
);
206
201
}
207
202
self ::$ _cache [$ key ] = $ files ;
0 commit comments