public function testFileToArray_Broken() { $xml = new PWEXML(PWEUnitTests::utGetCleanTMP()); try { $xml->FileToArray(__DIR__ . '/PWEXMLTestBroken.xml', $arr); throw new Exception("Exception expected"); } catch (RuntimeException $e) { } }
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'])); } }
protected function setUp() { $xml = new PWEXML(); $xml->FileToArray(__DIR__ . '/coreXML/out.xml', $this->struct); }
public function getSiteStructure() { $XML = new PWEXML($this->getTempDirectory()); $struct = array(); $XML->FileToArray($this->siteStructureFile, $struct); return $struct; }