Beispiel #1
0
 /**
  * @inheritdoc
  */
 public function current()
 {
     if (!isset($this->inMemoryReader)) {
         throw new \RuntimeException('The resource needs to be open.');
     }
     return $this->inMemoryReader->current();
 }
 /**
  * @covers Yosmanyga\Resource\Reader\Iterator\InMemoryReader::close
  * @expectedException \RuntimeException
  */
 public function testClose()
 {
     $reader = new InMemoryReader();
     $reader->open(new Resource(array('data' => array()), 'in_memory'));
     $reader->close();
     $reader->current();
 }