From 6bac928fcc6579cde5fa52ff8f9d8f8c548e8cd8 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Tue, 1 Nov 2016 17:50:24 +0530 Subject: [PATCH] CRM-19587, changed variable name and error message ---------------------------------------- * CRM-19587: DB Error when trying to delete FInancial Account https://issues.civicrm.org/jira/browse/CRM-19587 --- .../Financial/BAO/FinancialAccountTest.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php index 9a31b1c3a6..8b42216b6b 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialAccountTest.php @@ -47,11 +47,11 @@ class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase { 'is_active' => 1, ); $ids = array(); - $contributionType = CRM_Financial_BAO_FinancialAccount::add($params, $ids); + $financialAccount = CRM_Financial_BAO_FinancialAccount::add($params, $ids); $result = $this->assertDBNotNull( 'CRM_Financial_BAO_FinancialAccount', - $contributionType->id, + $financialAccount->id, 'name', 'id', 'Database check on updated financial type record.' @@ -74,7 +74,7 @@ class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase { $result = CRM_Financial_BAO_FinancialAccount::retrieve($params, $defaults); - $this->assertEquals($result->name, 'Donations', 'Verify financial type name.'); + $this->assertEquals($result->name, 'Donations', 'Verify financial account name.'); } /** @@ -87,18 +87,18 @@ class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase { 'is_active' => 1, ); $ids = array(); - $contributionType = CRM_Financial_BAO_FinancialAccount::add($params, $ids); - $result = CRM_Financial_BAO_FinancialAccount::setIsActive($contributionType->id, 0); - $this->assertEquals($result, TRUE, 'Verify financial type record updation for is_active.'); + $financialAccount = CRM_Financial_BAO_FinancialAccount::add($params, $ids); + $result = CRM_Financial_BAO_FinancialAccount::setIsActive($financialAccount->id, 0); + $this->assertEquals($result, TRUE, 'Verify financial account record updation for is_active.'); $isActive = $this->assertDBNotNull( 'CRM_Financial_BAO_FinancialAccount', - $contributionType->id, + $financialAccount->id, 'is_active', 'id', - 'Database check on updated for financial type is_active.' + 'Database check on updated for financial account is_active.' ); - $this->assertEquals($isActive, 0, 'Verify financial types is_active.'); + $this->assertEquals($isActive, 0, 'Verify financial account is_active.'); } /** @@ -111,12 +111,12 @@ class CRM_Financial_BAO_FinancialAccountTest extends CiviUnitTestCase { 'is_active' => 1, ); $ids = array(); - $contributionType = CRM_Financial_BAO_FinancialAccount::add($params, $ids); + $financialAccount = CRM_Financial_BAO_FinancialAccount::add($params, $ids); - CRM_Financial_BAO_FinancialAccount::del($contributionType->id); - $params = array('id' => $contributionType->id); + CRM_Financial_BAO_FinancialAccount::del($financialAccount->id); + $params = array('id' => $financialAccount->id); $result = CRM_Financial_BAO_FinancialAccount::retrieve($params, $defaults); - $this->assertEquals(empty($result), TRUE, 'Verify financial types record deletion.'); + $this->assertEquals(empty($result), TRUE, 'Verify financial account record deletion.'); } /** -- 2.25.1