public function testNoEntries() { $XML = simplexml_load_string('<Log><LogEntries></LogEntries></Log>'); $Parser = new ParserSLF3Single('', $XML); $Parser->parse(); $this->assertTrue($Parser->failed()); }
/** * Parse XML */ protected function parseXML() { if (!empty($this->XML->LogEntries)) { $Parser = new ParserSLF3Single('', $this->XML); $Parser->parse(); if ($Parser->failed()) { $this->addErrors($Parser->getErrors()); } else { $this->addObject($Parser->object()); } } }