Пример #1
0
 /**
  * @expectedException ZerusTech\Component\IO\Exception\IOException
  * @expectedExceptionMessage mark/reset not supported.
  */
 public function testMiscMethods()
 {
     $upstream = new PipedOutputStream();
     $input = new PipedInputStream($upstream);
     $input->buffer = [];
     $this->assertEquals(0, $input->available());
     $this->assertSame($input, $input->mark(100));
     $this->assertFalse($input->markSupported());
     $input->buffer[] = '*';
     $input->buffer[] = '*';
     $input->buffer[] = '*';
     $input->buffer[] = '*';
     $input->buffer[] = '*';
     $this->assertEquals(5, $input->skip(5));
     $this->assertFalse($input->isClosed());
     $input->close();
     $this->assertTrue($input->isClosed());
     $input->reset();
 }