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:
e830e31
)
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>
Sat, 9 Nov 2019 02:58:58 +0000
(13:58 +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 94ee4e49b8f865b9f59203a742942f5f84794762..ce980618ab2d3a12775b1dc34afa5753706bb61d 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'];