Esempio n. 1
0
 public function testCloseTwiceWillCloseInputAndOutputOnlyOnce()
 {
     $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);
     $input->expects($this->once())->method('close');
     $output->expects($this->once())->method('close');
     $stdio->close();
     $stdio->close();
 }