Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public function close()
 {
     if (!isset($this->inMemoryReader)) {
         throw new \RuntimeException('The resource needs to be open.');
     }
     $this->inMemoryReader->close();
     unset($this->inMemoryReader);
 }
Esempio n. 2
0
 /**
  * @covers Yosmanyga\Resource\Reader\Iterator\InMemoryReader::close
  * @expectedException \RuntimeException
  */
 public function testCloseThrowsExceptionWhenNoOpenResource()
 {
     $reader = new InMemoryReader();
     $reader->close();
 }