From 06eb4027a734e2de4d3d2dde5f527301a0113917 Mon Sep 17 00:00:00 2001 From: John Kary Date: Sun, 7 Oct 2012 09:46:43 -0500 Subject: [PATCH] Make test less brittle Shouldn't really care about whether the IO is touched. That's the test knowing too much about the implementation. --- tests/Composer/Test/Script/EventDispatcherTest.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/Composer/Test/Script/EventDispatcherTest.php b/tests/Composer/Test/Script/EventDispatcherTest.php index 6a06a2e46..15a7ff172 100644 --- a/tests/Composer/Test/Script/EventDispatcherTest.php +++ b/tests/Composer/Test/Script/EventDispatcherTest.php @@ -65,12 +65,11 @@ class EventDispatcherTest extends TestCase public function testDispatcherCanExecuteCliAndPhpInSameEventScriptStack() { - $io = $this->getMock('Composer\IO\IOInterface'); $process = $this->getMock('Composer\Util\ProcessExecutor'); $dispatcher = $this->getMockBuilder('Composer\Script\EventDispatcher') ->setConstructorArgs(array( $this->getMock('Composer\Composer'), - $io, + $this->getMock('Composer\IO\IOInterface'), $process, )) ->setMethods(array( @@ -79,8 +78,6 @@ class EventDispatcherTest extends TestCase )) ->getMock(); - $io->expects($this->never()) - ->method('write'); $process->expects($this->exactly(2)) ->method('execute');