Skip to content

Commit 8dc159f

Browse files
committed
[TASK] Reorganize Integration tests in subdirectories
We have so many integration tests now that we need to organize them better.
1 parent 06b57f0 commit 8dc159f

File tree

345 files changed

+5
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+5
-4
lines changed

tests/Integration/IntegrationTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,28 +151,29 @@ public static function getTrimmedFileContent(string $file): string
151151
/** @return mixed[] */
152152
public static function getTestsForDirectoryTest(): array
153153
{
154-
return self::getTestsForDirectory();
154+
return self::getTestsForDirectory(__DIR__ . '/tests');
155155
}
156156

157157
/** @return mixed[] */
158158
public static function getTestsForLatex(): array
159159
{
160-
return self::getTestsForDirectory('/tests-latex');
160+
return self::getTestsForDirectory(__DIR__ . '/tests-latex');
161161
}
162162

163163
/** @return mixed[] */
164-
private static function getTestsForDirectory(string $directory = '/tests'): array
164+
private static function getTestsForDirectory(string $directory): array
165165
{
166166
$finder = new SymfonyFinder();
167167
$finder
168168
->directories()
169-
->in(__DIR__ . $directory)
169+
->in($directory)
170170
->depth('== 0');
171171

172172
$tests = [];
173173

174174
foreach ($finder as $dir) {
175175
if (!file_exists($dir->getPathname() . '/input')) {
176+
$tests = array_merge($tests, self::getTestsForDirectory($dir->getPathname()));
176177
continue;
177178
}
178179

0 commit comments

Comments
 (0)