/**
  * @depends testConstructor
  * @param Config $config
  */
 public function testSetCrypt(Config $config)
 {
     $config->setCryptType(3);
     $this->assertEquals(3, $config->getCryptType());
     $config->setCryptType(19);
     // Invalid value
     $this->assertEquals(3, $config->getCryptType());
 }
 /**
  * @return \SimpleXMLElement
  */
 public function getXml()
 {
     $request_type = in_array($this->type, array('txn', 'acs')) ? 'MpiRequest' : 'request';
     $xml = new \SimpleXMLElement("<{$request_type}/>");
     $xml->addChild('store_id', $this->config->getStoreId());
     $xml->addChild('api_token', $this->config->getApiKey());
     $type = $xml->addChild($this->type);
     foreach ($this->params as $key => $value) {
         $type->addChild($key, $value);
     }
     $type->addChild('crypt_type', $this->config->getCryptType());
     return $xml;
 }