From a1bf6890d5204d1bd671f8ebf599ac0ecf8d0d27 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 24 Jan 2018 10:28:39 +0100 Subject: [PATCH] Fix ConsoleIO tests --- tests/Composer/Test/IO/ConsoleIOTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/IO/ConsoleIOTest.php b/tests/Composer/Test/IO/ConsoleIOTest.php index c02a2eae5..9c9ca8902 100644 --- a/tests/Composer/Test/IO/ConsoleIOTest.php +++ b/tests/Composer/Test/IO/ConsoleIOTest.php @@ -240,6 +240,7 @@ class ConsoleIOTest extends TestCase $this->isInstanceOf('Symfony\Component\Console\Output\OutputInterface'), $this->isInstanceOf('Symfony\Component\Console\Question\Question') ) + ->will($this->returnValue(array('item2'))); ; $setMock @@ -250,7 +251,8 @@ class ConsoleIOTest extends TestCase ; $consoleIO = new ConsoleIO($inputMock, $outputMock, $setMock); - $consoleIO->select('Select item', array("item1", "item2"), null, false, "Error message", true); + $result = $consoleIO->select('Select item', array("item1", "item2"), null, false, "Error message", true); + $this->assertEquals(array('1'), $result); } public function testSetAndgetAuthentication()