public function PHP2XML($data)
{
return str_repeat($this->_SPACER, 2) . '<data_block>' . $this->_convertData($data, 3) . $this->_CRLF . str_repeat($this->_SPACER, 2) . '</data_block>';
}
/** * should convert xml to php array. */ public function testXml2Php() { $ops = new Ops(); $data = array('convert' => 'this'); // use our built in php to xml to test $result = $ops->PHP2XML($data); // converting back, they should be the same $this->assertSame($data, $ops->XML2PHP($result)); }