From 253964712ebbf15913677cabd5cc2ab37b3d4488 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 3 Apr 2014 14:42:10 -0700 Subject: [PATCH] api_v3_GroupOrganizationTest - Fix error Was producing error because expression ($result['values'][0]['organization_id']) was invalid. The test content didn't meet the description/name and seemed weird. --- tests/phpunit/api/v3/GroupOrganizationTest.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/api/v3/GroupOrganizationTest.php b/tests/phpunit/api/v3/GroupOrganizationTest.php index 2f9c8bee3d..5f61b20ad6 100644 --- a/tests/phpunit/api/v3/GroupOrganizationTest.php +++ b/tests/phpunit/api/v3/GroupOrganizationTest.php @@ -99,17 +99,18 @@ class api_v3_GroupOrganizationTest extends CiviUnitTestCase { * Test civicrm_group_organization_get with group_id. */ public function testGroupOrganizationGetWithGroupId() { - - $params = array( + $createParams = array( 'organization_id' => $this->_orgID, - 'group_id' => $this->_groupID, 'sequential' => 1, + 'group_id' => $this->_groupID, ); - $result = $this->callAPISuccess('group_organization', 'create', $params); - - $paramsGet = array('organization_id' => $result['values'][0]['organization_id']); + $createResult = $this->callAPISuccess('group_organization', 'create', $createParams); - $result = $this->callAPISuccess('group_organization', 'get', $params); - $this->assertAPISuccess($result); + $getParams = array( + 'group_id' => $this->_groupID, + 'sequential' => 1, + ); + $getResult = $this->callAPISuccess('group_organization', 'get', $getParams); + $this->assertEquals($createResult['values'], $getResult['values'][0]); } /** -- 2.25.1