public function test_simple()
 {
     $hash_in = array('orderId' => '1', 'amount' => '2', 'orderSource' => 'ecommerce', 'card' => array('type' => 'VI', 'number' => '4100000000000000', 'expDate' => '1213', 'cardValidationNum' => '1213'));
     $initialize = new LitleOnlineRequest();
     $response = $initialize->unload($hash_in);
     $message = XmlParser::getAttribute($response, 'litleOnlineResponse', 'message');
     $this->assertEquals('Valid Format', $message);
 }
 public function test_simple()
 {
     $hash_in = array('orderId' => '1', 'amount' => '2', 'orderSource' => 'ECOMMERCE', 'card' => array('type' => 'VI', 'number' => '4100000000000000', 'expDate' => '1213', 'cardValidationNum' => '1213'));
     $mock = $this->getMock('litle\\sdk\\LitleXmlMapper');
     $mock->expects($this->once())->method('request')->with($this->matchesRegularExpression('/.*<orderId>1.*<amount>2.*<orderSource>ECOMMERCE.*<card.*type.*VI.*/'));
     $litleTest = new LitleOnlineRequest();
     $litleTest->newXML = $mock;
     $litleTest->unload($hash_in);
 }
 /**
  * Make an unload API request.
  *
  * This method wraps the LitleOnlineRequest.
  *
  * @param array $hash_in
  *   The request data.
  *
  * @return DOMDocument|SimpleXMLElement
  *   The response.
  */
 public function unload($hash_in)
 {
     return $this->request->unload($hash_in);
 }