Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11839

Contribution api - update payment instrument is failing

    Details

      Description

      I'm trying to get api_v3_ContributionTest test methods to all succeed. At the moment I'm stuck on the fact that 'update' on payment instrument is failing. I've narrowed it down to the fact that an invalid SQL query is getting run:

      SELECT account_relationship, financial_account_id
      FROM civicrm_entity_financial_account
      WHERE ( entity_id = )
      ORDER BY financial_account_id

      Here's the explicit output (but if you add debug => 1 to the api params you'll get the bad query etc.)

      1) api_v3_ContributionTest::testCreateContributionWithPaymentInstrument
      DB Error:
      Failed asserting that 1 matches expected 0.

      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:591
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:552
      /Users/dgg/svn/crm_v4.3/tools/scripts/phpunit:76

      NOTE: If you can get to fixing any of the other errors as in this test that would be awesome. I'm getting a total of 6 failures as of this evening.


      2) api_v3_ContributionTest::testCreateContributionWithFee
      Value Mismatch On to_financial_account_id - value 1 is 5 value 2 is 6
      Failed asserting that '6' matches expected 5.

      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:558
      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:516
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1622
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:792
      /Users/dgg/svn/crm_v4.3/tools/scripts/phpunit:76

      3) api_v3_ContributionTest::testCreateUpdateContributionPaymentInstrument
      Attribute 'from_financial_account_id' not present in actual array.

      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:561
      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:516
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1522
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:975
      /Users/dgg/svn/crm_v4.3/tools/scripts/phpunit:76

      4) api_v3_ContributionTest::testCreateUpdateContributionRefund
      Value Mismatch On to_financial_account_id - value 1 is 6 value 2 is 12
      Failed asserting that '12' matches expected 6.

      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:558
      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:516
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1522
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:998
      /Users/dgg/svn/crm_v4.3/tools/scripts/phpunit:76

      5) api_v3_ContributionTest::testCreateUpdateContributionCancelPending
      Value Mismatch On financial_account_id - value 1 is 3 value 2 is 1
      Failed asserting that '1' matches expected 3.

      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:558
      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:516
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1460
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1023
      /Users/dgg/svn/crm_v4.3/tools/scripts/phpunit:76

      6) api_v3_ContributionTest::testCreateUpdateContributionChangeFinancialType
      Value Mismatch On to_financial_account_id - value 1 is 6 value 2 is 12
      Failed asserting that '12' matches expected 6.

      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:558
      /Users/dgg/svn/crm_v4.3/tests/phpunit/CiviTest/CiviUnitTestCase.php:516
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1515
      /Users/dgg/svn/crm_v4.3/tests/phpunit/api/v3/ContributionTest.php:1046
      /Users/dgg/svn/crm_v4.3/tools/scripts/phpunit:76

        Attachments

          Activity

            People

            • Assignee:
              pradeep.nayak Pradeep Nayak
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: