improve error reporting on failed example test
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 27 Jan 2015 04:55:45 +0000 (17:55 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Tue, 27 Jan 2015 04:55:45 +0000 (17:55 +1300)
tests/phpunit/api/v3/ContributionTest.php

index 93fd7c50276bc8f2df5abb1e60e945e52b068153..dfc84cf1dbd2c63c3bebfee7d2acba83d34ea25a 100644 (file)
@@ -712,7 +712,7 @@ 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->assertAPISuccess($result);
+    $this->assertArrayHasKey('is_error', $result, print_r($result, TRUE));
     $contributionId = $result['id'];
     $expectedResult = contribution_create_expectedresult();
     $this->checkArrayEquals($expectedResult, $result);