/**
  * Tests Fake reason code
  */
 public function testPaymentRequestCodeXmlFromCodeFailed()
 {
     $paymentRequest = new PaymentRequest();
     $paymentRequest->addAccount(SampleXmlValidationUtils::HOLD_ACCOUNT);
     $paymentRequest->addMerchantId(SampleXmlValidationUtils::HOLD_MERCHANT_ID);
     $paymentRequest->addTimestamp(SampleXmlValidationUtils::HOLD_TIMESTAMP);
     $paymentRequest->addOrderId(SampleXmlValidationUtils::HOLD_ORDER_ID);
     $paymentRequest->addHash(SampleXmlValidationUtils::HOLD_REQUEST_HASH);
     $paymentRequest->addType(PaymentType::HOLD);
     $paymentRequest->addReasonCode('fake reason');
     $reasons = array(ReasonCode::FRAUD, ReasonCode::FALSE_POSITIVE, ReasonCode::IN_STOCK, ReasonCode::NOT_GIVEN, ReasonCode::OTHER, ReasonCode::OUT_OF_STOCK);
     foreach ($reasons as $reason) {
         //marshal to XML
         $xml = $paymentRequest->toXml();
         //unmarshal back to response
         /* @var PaymentResponse $fromXmlResponse */
         $fromXmlResponse = new PaymentRequest();
         $fromXmlResponse = $fromXmlResponse->fromXML($xml);
         SampleXmlValidationUtils::checkUnmarshalledRequestCodeResponse($fromXmlResponse, $this, $reason, false);
     }
 }