예제 #1
0
 public function testNoEntries()
 {
     $XML = simplexml_load_string('<Log><LogEntries></LogEntries></Log>');
     $Parser = new ParserSLF3Single('', $XML);
     $Parser->parse();
     $this->assertTrue($Parser->failed());
 }
예제 #2
0
 /**
  * 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());
         }
     }
 }