$entityDef) { foreach ($entityDef['schema'] as $fieldName => $fieldDef) { $this->assertNotEmpty($fieldDef['type']); $this->assertNotEmpty($fieldDef['title']); $this->assertNotEmpty($fieldDef['civiFieldType']); } } $this->assertEquals('Individual', $schema['IndividualModel']['schema']['first_name']['civiFieldType']); $this->assertTrue(empty($schema['IndividualModel']['schema']['first_name']['civiIsLocation'])); $this->assertTrue(empty($schema['IndividualModel']['schema']['first_name']['civiIsPhone'])); $this->assertEquals('Contact', $schema['IndividualModel']['schema']['street_address']['civiFieldType']); $this->assertNotEmpty($schema['IndividualModel']['schema']['street_address']['civiIsLocation']); $this->assertTrue(empty($schema['IndividualModel']['schema']['street_address']['civiIsPhone'])); $this->assertEquals('Contact', $schema['IndividualModel']['schema']['phone_and_ext']['civiFieldType']); $this->assertNotEmpty($schema['IndividualModel']['schema']['phone_and_ext']['civiIsLocation']); $this->assertNotEmpty($schema['IndividualModel']['schema']['phone_and_ext']['civiIsPhone']); $this->assertEquals('Activity', $schema['ActivityModel']['schema']['activity_subject']['civiFieldType']); $this->assertTrue(empty($schema['ActivityModel']['schema']['activity_subject']['civiIsLocation'])); $this->assertTrue(empty($schema['ActivityModel']['schema']['activity_subject']['civiIsPhone'])); // don't mix up contacts and activities $this->assertTrue(empty($schema['IndividualModel']['schema']['activity_subject'])); $this->assertTrue(empty($schema['ActivityModel']['schema']['street_address'])); } }