示例#1
0
 /**
  * Method to test eof().
  *
  * @return void
  *
  * @covers Windwalker\Http\Stream\StringStream::eof
  */
 public function testEof()
 {
     $stream = new StringStream('FOO BAR');
     $stream->seek(2);
     $this->assertFalse($stream->eof());
     $stream->seek(7);
     $this->assertTrue($stream->eof());
 }
 /**
  * Method to test eof().
  *
  * @return void
  *
  * @covers \Windwalker\Http\Stream\StringStream::eof
  */
 public function testEof()
 {
     $stream = new StringStream('FOO BAR');
     $stream->read(2);
     $this->assertFalse($stream->eof());
     $stream->rewind();
     $stream->read(8);
     $this->assertTrue($stream->eof());
     $stream->rewind();
     $stream->seek(8);
     $this->assertFalse($stream->eof());
     $stream->read(1);
     $this->assertTrue($stream->eof());
     $stream->rewind();
     $stream->read(4096);
     $this->assertTrue($stream->eof());
 }