From 6fee17f16cefbf7b08dad4bfef69919922a1f9aa Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 29 Aug 2019 15:09:26 +0200 Subject: [PATCH] Fix tests, refs #8292 --- tests/Composer/Test/ApplicationTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Composer/Test/ApplicationTest.php b/tests/Composer/Test/ApplicationTest.php index 8739a5004..48615af9c 100644 --- a/tests/Composer/Test/ApplicationTest.php +++ b/tests/Composer/Test/ApplicationTest.php @@ -25,7 +25,13 @@ class ApplicationTest extends TestCase $inputMock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(); $outputMock = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')->getMock(); + putenv('COMPOSER_NO_INTERACTION=1'); + $index = 0; + $inputMock->expects($this->at($index++)) + ->method('setInteractive') + ->with($this->equalTo(false)); + $inputMock->expects($this->at($index++)) ->method('hasParameterOption') ->with($this->equalTo('--no-plugins')) @@ -83,7 +89,13 @@ class ApplicationTest extends TestCase $inputMock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(); $outputMock = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')->getMock(); + putenv('COMPOSER_NO_INTERACTION=1'); + $index = 0; + $inputMock->expects($this->at($index++)) + ->method('setInteractive') + ->with($this->equalTo(false)); + $inputMock->expects($this->at($index++)) ->method('hasParameterOption') ->with($this->equalTo('--no-plugins'))