projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3493feb
)
Fix unit test for APIv4 format
author
Seamus Lee
<seamuslee001@gmail.com>
Wed, 9 Oct 2019 09:24:42 +0000
(20:24 +1100)
committer
Seamus Lee
<seamuslee001@gmail.com>
Wed, 20 Nov 2019 21:24:22 +0000
(08:24 +1100)
tests/phpunit/api/v3/ContactTest.php
patch
|
blob
|
blame
|
history
diff --git
a/tests/phpunit/api/v3/ContactTest.php
b/tests/phpunit/api/v3/ContactTest.php
index dfcf158e320a72c52b9b19552644b7579d462715..b48a3bb32ed3e9697ecaa8a3f9445e9de3ea4e3b 100644
(file)
--- a/
tests/phpunit/api/v3/ContactTest.php
+++ b/
tests/phpunit/api/v3/ContactTest.php
@@
-638,7
+638,8
@@
class api_v3_ContactTest extends CiviUnitTestCase {
'contact_id' => $contactId,
'return' => 'contact_id.api_key',
]);
- $this->assertEquals('abcd1234', $joinResult['contact_id.api_key']);
+ $field = $this->_apiversion == 4 ? 'contact.api_key' : 'contact_id.api_key';
+ $this->assertEquals('abcd1234', $joinResult[$field]);
// Restricted return -- because we don't have permission
$config->userPermissionClass->permissions = ['access CiviCRM', 'view all contacts', 'edit all contacts'];