예제 #1
0
 /**
  * Test that an error is returned if required set & contribution page exists
  */
 public function testRequiredWithContributionPageError()
 {
     $this->_setUpContributionObjects();
     $result = $this->IPN->loadObjects($this->input, $this->ids, $this->objects, TRUE, NULL, array('return_error' => 1));
     $this->assertArrayHasKey('error_message', $result);
     $this->assertEquals('Could not find payment processor for contribution record: 1', $result['error_message']);
     // error is only returned if $required set to True
     $result = $this->IPN->loadObjects($this->input, $this->ids, $this->objects, FALSE, NULL, array('return_error' => 1));
     $this->assertFalse(is_array($result));
     //check that error is not returned if error checking not set
     $result = $this->IPN->loadObjects($this->input, $this->ids, $this->objects, TRUE, NULL, array('log_error' => 1));
     $this->assertFalse(is_array($result));
 }