示例#1
0
 public function __construct(array $data)
 {
     if (!isset($data['error']) && !isset($data['order'])) {
         throw new ResultException(__('Either error or order is required in a payment result'), ResultException::INVALID_RESULT_FORMAT);
     }
     parent::__construct($data);
 }
示例#2
0
 public function testBadMagicCall()
 {
     $payload = Payload::create([]);
     $e = null;
     try {
         $payload->hello();
     } catch (Exception $e) {
     }
     $this->assertInstanceOf(ErrorException::class, $e);
 }