Alter contribution example test to try to get an error message
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 27 Jan 2015 17:39:17 +0000 (06:39 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Tue, 27 Jan 2015 17:39:17 +0000 (06:39 +1300)
tests/phpunit/api/v3/ContributionTest.php

index dfc84cf1dbd2c63c3bebfee7d2acba83d34ea25a..2cd594c840195c808fe77fa498b87a248464b488 100644 (file)
@@ -712,15 +712,13 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
     $this->callAPISuccess('contribution_page', 'create', $this->_pageParams);
     require_once 'api/v3/examples/Contribution/Create.php';
     $result = contribution_create_example();
-    $this->assertArrayHasKey('is_error', $result, print_r($result, TRUE));
-    $contributionId = $result['id'];
     $expectedResult = contribution_create_expectedresult();
     $this->checkArrayEquals($expectedResult, $result);
-    $this->contributionDelete($contributionId);
+    $this->contributionDelete($result['id']);
   }
 
   /**
-   * Function tests that additional financial records are created when fee amount is recorded
+   * Function tests that additional financial records are created when fee amount is recorded.
    */
   public function testCreateContributionWithFee() {
     $params = array(