*/
public function setUp(): void {
$tablesToTruncate = [
+ 'civicrm_case_type',
'civicrm_custom_group',
'civicrm_custom_field',
'civicrm_group',
$this->dropByPrefix('civicrm_value_myfavorite');
$this->cleanup(['tablesToTruncate' => $tablesToTruncate]);
$this->setUpOptionCleanup();
+ $this->loadDataSet('CaseType');
$this->loadDataSet('ConformanceTest');
$this->creationParamProvider = \Civi::container()->get('test.param_provider');
parent::setUp();
$this->assertNotEmpty($info['title_plural']);
$this->assertNotEmpty($info['type']);
$this->assertNotEmpty($info['description']);
+ $this->assertContains($info['searchable'], ['primary', 'secondary', 'none']);
+ // Bridge must be between exactly 2 entities
+ if (in_array('EntityBridge', $info['type'], TRUE)) {
+ $this->assertCount(2, $info['bridge']);
+ }
}
/**
$errMsg = sprintf('%s is missing required ID field', $entity);
$subset = ['data_type' => 'Integer'];
- $this->assertArraySubset($subset, $fields['id'], $errMsg);
+ $this->assertArrayHasKey('data_type', $fields['id'], $errMsg);
+ $this->assertEquals('Integer', $fields['id']['data_type']);
}
/**
catch (\API_Exception $e) {
$exceptionThrown = $e->getMessage();
}
- $this->assertContains('id', $exceptionThrown);
+ $this->assertStringContainsString('id', $exceptionThrown);
}
/**
catch (\API_Exception $e) {
$exceptionThrown = $e->getMessage();
}
- $this->assertContains('required', $exceptionThrown);
+ $this->assertStringContainsString('required', $exceptionThrown);
}
/**
catch (\API_Exception $e) {
$exceptionThrown = $e->getMessage();
}
- $this->assertContains('debug', $exceptionThrown);
- $this->assertContains('type', $exceptionThrown);
+ $this->assertStringContainsString('debug', $exceptionThrown);
+ $this->assertStringContainsString('type', $exceptionThrown);
}
/**