Esempio n. 1
0
 public function testGetString()
 {
     $value = 'test';
     $o = new XmlReader();
     $o->setString($value);
     $this->assertEquals($value, $o->getString());
 }
Esempio n. 2
0
 public function testBuildObjectFromIncompleteXml()
 {
     $value = '<t>test</t>';
     $o = new XmlReader();
     $o->setString($value);
     $o->buildObj();
     $this->assertInstanceOf(\DOMDocument::class, $o->getDom());
     $this->assertContains($value, $o->getDom()->saveXML());
     // the output xml contains the XML header
 }
Esempio n. 3
0
 public function buildObj()
 {
     parent::buildObj();
     $oNode = $this->getDom()->getElementsByTagName('channel')->item(0);
     if ($oNode instanceof \DOMElement) {
         $this->parseToEntity($oNode->childNodes);
     }
 }
Esempio n. 4
0
 public function testEmptyAtInitialization()
 {
     $o = new XmlReader();
     $this->assertNull($o->getDom());
 }