Esempio n. 1
0
 public function testFlush()
 {
     $streams = $this->provideStreams();
     $executor = new Executor();
     $this->assertSame(0, $executor->flush('echo foo', $streams));
     rewind($streams[0]);
     $this->assertSame('', fread($streams[0], 1024));
     rewind($streams[1]);
     $this->assertSame("foo\r\n", fread($streams[1], 1024));
     rewind($streams[2]);
     $this->assertSame('', fread($streams[2], 1024));
 }