We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c0dedc6 + db30d9c commit 4c90917Copy full SHA for 4c90917
src/Tests/TestRunner.php
@@ -140,12 +140,14 @@ private function setBasedir()
140
$iterator = $finder
141
->files()
142
->name('composer.json')
143
- ->exclude('vendor')
+ ->exclude(['vendor', 'tests'])
144
->in($this->directory);
145
146
- if (count($iterator) != 1)
+ $iteratorCount = count($iterator);
147
+
148
+ if ($iteratorCount !== 1)
149
{
- throw new TestException("Can't find the required composer.json file.");
150
+ throw new TestException($iteratorCount === 0 ? 'Could not find the required composer.json file.' : 'Found multiple composer.json files.');
151
}
152
153
$composer = '';
0 commit comments