/** * Should convert php arrays to valid xml recursivly. */ public function testConvertData() { $ops = new Ops(); $data = array('please' => 'convert', 'me'); $result = $ops->_convertData($data); $xml = XMLReader::xml($result); // The validate parser option must be enabled for // this method to work properly $xml->setParserProperty(XMLReader::VALIDATE, true); // make sure this is xml $this->assertTrue($xml->isValid()); }