Esempio n. 1
0
 public function testToString()
 {
     if ($this->stream->isReadable()) {
         $this->assertEquals(0, $this->stream->tell());
         $this->assertEquals('foobar', (string) $this->stream);
         $this->assertEquals(6, $this->stream->tell());
     } else {
         $this->assertEquals('', (string) $this->stream);
     }
 }
Esempio n. 2
0
 public function __construct(StreamInterface $stream)
 {
     $this->data = '';
     $this->length = $stream->getSize();
     $this->source = $stream;
 }