837d7d87e06e58d201066ae6df1bc1e6b4bdca15
3 namespace api\v
4\Action
;
5 use api\v
4\UnitTestCase
;
11 class GetExtraFieldsTest
extends UnitTestCase
{
13 public function testBAOFieldsWillBeReturned() {
14 $returnedFields = Contact
::getFields()
18 $baseFields = \CRM_Contact_BAO_Contact
::fields();
19 $baseFieldNames = array_column($baseFields, 'name');
20 $returnedFieldNames = array_column($returnedFields, 'name');
21 $notReturned = array_diff($baseFieldNames, $returnedFieldNames);
23 $this->assertEmpty($notReturned);