PHP2XML() public method

Converts a PHP array into an OPS data_block tag.
public PHP2XML ( $data ) : string
return string OPS data_block tag
コード例 #1
0
ファイル: OpsTest.php プロジェクト: opensrs/osrs-toolkit-php
 /**
  * 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));
 }