예제 #1
0
 public function rewind()
 {
     return $this->rewindFunction ? call_user_func($this->rewindFunction, $this) : parent::rewind();
 }
 /**
  * @covers Guzzle\Stream\Stream::rewind
  */
 public function testRewindIsSeekZero()
 {
     $stream = new Stream(fopen('php://temp', 'w+'));
     $stream->write('foobazbar');
     $this->assertTrue($stream->rewind());
     $this->assertEquals('foobazbar', $stream->read(9));
 }