From 89edbc8506e40c1bf4135d5995b58944216f74e4 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 26 Jul 2013 20:13:01 +1200 Subject: [PATCH] CRM-13072 minor tweaks loc block test --- tests/phpunit/api/v3/LocBlockTest.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/api/v3/LocBlockTest.php b/tests/phpunit/api/v3/LocBlockTest.php index 3d22322027..e82639a23b 100644 --- a/tests/phpunit/api/v3/LocBlockTest.php +++ b/tests/phpunit/api/v3/LocBlockTest.php @@ -1,5 +1,4 @@ $phone['id'], 'email_id' => $email['id'], ); - $result = $this->callAPISuccess($this->_entity, 'create', $params); + $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__); $id = $result['id']; - $this->documentMe($params, $result, __FUNCTION__, __FILE__); - $this->assertAPISuccess($result, 'In line ' . __LINE__); $this->assertEquals(1, $result['count'], 'In line ' . __LINE__); $this->assertNotNull($result['values'][$id]['id'], 'In line ' . __LINE__); $this->getAndCheck($params, $id, $this->_entity); @@ -92,14 +89,11 @@ class api_v3_LocBlockTest extends CiviUnitTestCase { $this->assertEquals(1, $result['count'], 'In line ' . __LINE__); // Now check our results using the return param 'all' - $getParams = array( - 'version' => $this->_apiversion, - 'id' => $id, + $getParams = array( 'id' => $id, 'return' => 'all' ); // Can't use callAPISuccess with getsingle - $result = civicrm_api($this->_entity, 'getsingle', $getParams); - $this->documentMe($getParams, $result, __FUNCTION__, __FILE__, 'Get entities and location block in 1 api call', NULL, 'get'); + $result = $this->callAPIAndDocument($this->_entity, 'getsingle', $getParams, __FUNCTION__, __FILE__, 'Get entities and location block in 1 api call', NULL, 'get'); $this->assertNotNull($result['email_id'], 'In line ' . __LINE__); $this->assertNotNull($result['phone_id'], 'In line ' . __LINE__); $this->assertNotNull($result['phone_2_id'], 'In line ' . __LINE__); -- 2.25.1