Ejemplo n.º 1
0
 public function testFileToArray_Broken()
 {
     $xml = new PWEXML(PWEUnitTests::utGetCleanTMP());
     try {
         $xml->FileToArray(__DIR__ . '/PWEXMLTestBroken.xml', $arr);
         throw new Exception("Exception expected");
     } catch (RuntimeException $e) {
     }
 }
Ejemplo n.º 2
0
 protected function loadRegistry($force = false)
 {
     if (!$force && $this->registryArray) {
         return;
     }
     PWELogger::debug("Loading registry file: %s", $this->registryFile);
     // read site structure
     $XML = new PWEXML($this->PWE->getTempDirectory());
     $this->registryArray = array();
     $XML->FileToArray($this->registryFile, $this->registryArray);
     $logger = $this->getModuleSettings('PWE\\Core\\PWELogger');
     if ($logger['!a']) {
         PWELogger::setLevel(PWELogger::getLevelByName($logger['!a']['level']));
     }
 }
Ejemplo n.º 3
0
 protected function setUp()
 {
     $xml = new PWEXML();
     $xml->FileToArray(__DIR__ . '/coreXML/out.xml', $this->struct);
 }
Ejemplo n.º 4
0
 public function getSiteStructure()
 {
     $XML = new PWEXML($this->getTempDirectory());
     $struct = array();
     $XML->FileToArray($this->siteStructureFile, $struct);
     return $struct;
 }