Skip to content

Commit b4f4d6b

Browse files
committed
Fix legacy test
1 parent 7e1e5b2 commit b4f4d6b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/PackageDiff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ private function getFileContents($path, $lockFile = true)
230230
throw new \RuntimeException(sprintf('Could not open file %s or find it in git as %s: %s', $originalPath, $path, $outputString));
231231
}
232232

233+
/* @infection-ignore-all False-positive */
233234
return '{}'; // Do not throw exception for composer.json as it might not exist and that's fine
234235
}
235236

tests/Integration/DiffCommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public function testComposerApplication($expectedOutput, array $input)
4444
$app->setIO(new NullIO()); // For Composer v1
4545
$app->setAutoExit(false);
4646
$plugin = $this->getPluginPackage();
47-
$config = array('allow-plugins' => array($plugin->getName() => true));
47+
$config = array(
48+
'allow-plugins' => array($plugin->getName() => true),
49+
'github-oauth' => array('github.com' => 'dummy'),
50+
);
4851
$composer = Factory::create($app->getIO(), array('config' => $config), true);
4952
$app->setComposer($composer);
5053
$pm = new PluginManager($app->getIO(), $composer);

0 commit comments

Comments
 (0)