소스 검색

Make test less brittle

Shouldn't really care about whether the IO is touched.
That's the test knowing too much about the implementation.
John Kary 13 년 전
부모
커밋
06eb4027a7
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      tests/Composer/Test/Script/EventDispatcherTest.php

+ 1 - 4
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');