Beispiel #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);
 }
 /**
  * @covers Yosmanyga\Resource\Reader\Iterator\InMemoryReader::close
  * @expectedException \RuntimeException
  */
 public function testCloseThrowsExceptionWhenNoOpenResource()
 {
     $reader = new InMemoryReader();
     $reader->close();
 }