Ejemplo n.º 1
0
 public function testCloseClearProperties()
 {
     $handle = fopen('php://temp', 'r+');
     $stream = new Stream($handle);
     $stream->close();
     $this->assertFalse($stream->isSeekable());
     $this->assertFalse($stream->isReadable());
     $this->assertFalse($stream->isWritable());
     $this->assertNull($stream->getSize());
     $this->assertEmpty($stream->getMetadata());
 }
Ejemplo n.º 2
0
 /**
  * Get the size of the file
  *
  * @return int
  */
 public function getSize()
 {
     return $this->stream->getSize();
 }