public function testXML() { $xml = simplexml_load_file(__DIR__ . '/test.xml'); $a = ArrayHelper::toArray($xml); $this->assertEquals($a, ['@attributes' => ['backupGlobals' => 'false', 'backupStaticAttributes' => 'false', 'colors' => 'true', 'convertErrorsToExceptions' => 'true', 'convertNoticesToExceptions' => 'true', 'convertWarningsToExceptions' => 'true', 'processIsolation' => 'false', 'stopOnFailure' => 'false', 'syntaxCheck' => 'false', 'bootstrap' => './tests/bootstrap.php'], 'testsuites' => ['testsuite' => ['@attributes' => ['name' => 'PhpCollection Unit Test Suite'], 'directory' => './tests/']]]); }
/** * {@inheritdoc} */ public function parsePath($path, $minimal = null) { $this->_xml = simplexml_load_file(file_exists($path) ? $path : $minimal); return ArrayHelper::toArray($this->_xml); }