Ejemplo n.º 1
0
 /**
  * @test
  * @expectedException RuntimeException
  */
 public function tryingToGetTheOpeningTagForAClosingTagThrowsAnException()
 {
     $this->reader->xml('<root><b></b></root>');
     while ($this->reader->read()) {
         if ('root' == $this->reader->localName || XMLReader::END_ELEMENT != $this->reader->nodeType) {
             continue;
         }
         $this->reader->nodeOpenString();
     }
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param Setup     $setup
  * @param XMLReader $xmlreader
  * @param string    $xml Input XML
  * @param XMLReader $xmlreader
  */
 public function __construct(Setup $setup, XMLReader $xmlreader, $xml)
 {
     $this->setup = $setup;
     $this->r = $xmlreader;
     $this->r->xml($xml);
 }