Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function end()
 {
     if (!$this->writer) {
         throw new \LogicException('Start writer first');
     }
     $this->write(sprintf('</%s>', $this->rootNode));
     $this->writer->endDocument();
     $this->flush();
     $this->writer = null;
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \LogicException
  */
 public function testEndWithoutStart()
 {
     $writer = new XmlWriter(new TempFile());
     $writer->end();
 }