Skip to content

Commit

Permalink
extract building the exclude list outside of building the directory list
Browse files Browse the repository at this point in the history
  • Loading branch information
drealecs committed Apr 10, 2022
1 parent 7974113 commit 4c191eb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/TextUI/Configuration/Xml/TestSuiteMapper.php
Expand Up @@ -52,17 +52,17 @@ public function map(TestSuiteCollection $configuration, string $filter, string $
$testSuite = new TestSuiteObject($testSuiteConfiguration->name());
$testSuiteEmpty = true;

$exclude = [];

foreach ($testSuiteConfiguration->exclude()->asArray() as $file) {
$exclude[] = $file->path();
}

foreach ($testSuiteConfiguration->directories() as $directory) {
if (!version_compare(PHP_VERSION, $directory->phpVersion(), $directory->phpVersionOperator()->asString())) {
continue;
}

$exclude = [];

foreach ($testSuiteConfiguration->exclude()->asArray() as $file) {
$exclude[] = $file->path();
}

$files = (new Facade)->getFilesAsArray(
$directory->path(),
$directory->suffix(),
Expand Down

0 comments on commit 4c191eb

Please sign in to comment.