|
|
|
@ -158,6 +158,8 @@ class InstallerTest extends TestCase
|
|
|
|
|
->method('writeError')
|
|
|
|
|
->will($this->returnCallback($callback));
|
|
|
|
|
|
|
|
|
|
// Prepare for exceptions
|
|
|
|
|
try {
|
|
|
|
|
$composer = FactoryMock::create($io, $composerConfig);
|
|
|
|
|
|
|
|
|
|
$jsonMock = $this->getMockBuilder('Composer\Json\JsonFile')->disableOriginalConstructor()->getMock();
|
|
|
|
@ -249,6 +251,17 @@ class InstallerTest extends TestCase
|
|
|
|
|
$this->assertEquals(rtrim($expectOutput), rtrim($output));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(\Exception $e) {
|
|
|
|
|
// Exception was thrown during execution
|
|
|
|
|
if (!$expect || !$expectOutput) {
|
|
|
|
|
throw $e;
|
|
|
|
|
}
|
|
|
|
|
$this->assertEquals('EXCEPTION', rtrim($expect));
|
|
|
|
|
$normalizedOutput = rtrim(str_replace("\n", PHP_EOL, $expectOutput));
|
|
|
|
|
$this->assertEquals($normalizedOutput, rtrim($e->getMessage()));
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getIntegrationTests()
|
|
|
|
|
{
|
|
|
|
|