From 897ff8c57843b7fe54d38560b476172154e4a861 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 27 Feb 2019 05:28:08 +1300 Subject: [PATCH] Fix bug in test set up --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 4b82c3f9a5..a0f04fe81a 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -3396,13 +3396,13 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) ), $params ); - $newPaymentInstrument = $this->callAPISuccess('OptionValue', 'create', $params); + $newPaymentInstrument = $this->callAPISuccess('OptionValue', 'create', $params)['id']; $relationTypeID = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Asset Account is' ")); $financialAccountParams = [ 'entity_table' => 'civicrm_option_value', - 'entity_id' => key($newPaymentInstrument), + 'entity_id' => $newPaymentInstrument, 'account_relationship' => $relationTypeID, 'financial_account_id' => $this->callAPISuccess('FinancialAccount', 'getValue', ['name' => $financialAccountName, 'return' => 'id']), ]; -- 2.25.1