コード例 #1
0
ファイル: StdioTest.php プロジェクト: clue/stdio-react
 public function testPipeWillReturnDestStream()
 {
     $input = $this->getMock('React\\Stream\\ReadableStreamInterface');
     $output = $this->getMock('React\\Stream\\WritableStreamInterface');
     //$readline = $this->getMockBuilder('Clue\React\Stdio\Readline')->disableOriginalConstructor()->getMock();
     $readline = new Readline($input, $output);
     $stdio = new Stdio($this->loop, $input, $output, $readline);
     $dest = $this->getMock('React\\Stream\\WritableStreamInterface');
     $ret = $stdio->pipe($dest);
     $this->assertSame($dest, $ret);
 }