/**
* Should convert php arrays to valid xml.
*/
public function testEncode()
{
$ops = new Ops();
$data = array('protocol' => '', 'action' => '', 'object' => '');
$result = $ops->encode($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());
}