function getRootName() { if ($this->_root === null) { return $this->raiseError('No unserialized data available. ' . 'Use XML_Unserializer::unserialize() first.', XML_UNSERIALIZER_ERROR_NO_UNSERIALIZATION); } return $this->_root; }
/** * Test extracting the root name */ public function testRootName() { $u = new XML_Unserializer(); $xml = '<xml>data</xml>'; $u->unserialize($xml); $this->assertEquals('xml', $u->getRootName()); }