示例#1
0
 /**
  * @param PaymentResult $paymentResult
  */
 public function __construct(PaymentResult $paymentResult)
 {
     if (!$paymentResult->isValid()) {
         throw new \InvalidArgumentException("PaymentResult is not valid");
     }
     $this->paymentResult = $paymentResult;
 }
 public function testNotValid()
 {
     $result = new PaymentResult('entity', 'reference', '1.23', 'authorizationKey', 'err', 'key');
     $this->assertFalse($result->isValid());
 }