}
$page = new CRM_Contact_Page_View_Note();
$page->_contactId = $contactId;
- $page->_permission = CRM_Core_PERMISSION::EDIT;
+ $page->_permission = CRM_Core_Permission::EDIT;
$page->browse();
$this->assertEquals(count($page->values), 5);
foreach ($page->values as $note) {
public function setUp(): void {
parent::setUp();
- $this->cache = new CRM_Utils_Cache_Arraycache([]);
+ $this->cache = new CRM_Utils_Cache_ArrayCache([]);
self::initWebResponses();
}
$this->assertTrue(substr($contribution['contribution_source'], 0, 20) === "Online Contribution:");
$contributionRecur = $this->callAPISuccess('contribution_recur', 'getsingle', ['id' => $this->_contributionRecurID]);
$this->assertEquals(5, $contributionRecur['contribution_status_id']);
- $paypalIPN = new CRM_Core_Payment_PaypalIPN($this->getPaypalRecurSubsequentTransaction());
+ $paypalIPN = new CRM_Core_Payment_PayPalIPN($this->getPaypalRecurSubsequentTransaction());
$paypalIPN->main();
$renewedMembershipEndDate = $this->membershipRenewalDate($durationUnit, $membershipEndDate);
$this->assertEquals($renewedMembershipEndDate, $this->callAPISuccessGetValue('membership', ['return' => 'end_date']));
$this->assertEquals('Online Contribution:', substr($contribution['contribution_source'], 0, 20));
$contributionRecur = $this->callAPISuccess('contribution_recur', 'getsingle', ['id' => $this->_contributionRecurID]);
$this->assertEquals(5, $contributionRecur['contribution_status_id']);
- $paypalIPN = new CRM_Core_Payment_PaypalProIPN($this->getPaypalProRecurSubsequentTransaction());
+ $paypalIPN = new CRM_Core_Payment_PayPalProIPN($this->getPaypalProRecurSubsequentTransaction());
$paypalIPN->main();
$renewedMembershipEndDate = $this->membershipRenewalDate($durationUnit, $membershipEndDate);
public function testGet() {
$basedir = $this->createExamples();
$strings = new CRM_Core_Resources_Strings(
- new CRM_Utils_Cache_Arraycache(NULL)
+ new CRM_Utils_Cache_ArrayCache(NULL)
);
$this->assertEquals(
['Hello from Javascript'],
parent::setUp();
$this->mapper = $this->createMapper();
- $cache = new CRM_Utils_Cache_Arraycache([]);
+ $cache = new CRM_Utils_Cache_ArrayCache([]);
$this->res = new CRM_Core_Resources($this->mapper, new CRM_Core_Resources_Strings($cache), NULL);
$this->res->setCacheCode('resTest');
CRM_Core_Resources::singleton($this->res);
}
public function testCaching() {
- $cache = new CRM_Utils_Cache_Arraycache([]);
+ $cache = new CRM_Utils_Cache_ArrayCache([]);
$this->assertTrue(!is_array($cache->get('basic-scan')));
[$basedir, $c] = $this->_createContainer($cache, 'basic-scan');
$this->assertEquals('http://example/basedir/foo', $c->getResUrl('test.foo'));
}
public function testCaching() {
- $cache = new CRM_Utils_Cache_Arraycache([]);
+ $cache = new CRM_Utils_Cache_ArrayCache([]);
$this->assertTrue(!is_array($cache->get('ext-collection')));
$c = $this->_createContainer($cache, 'ext-collection');
$this->assertEquals('http://foo', $c->getResUrl('test.foo'));
*/
public function testToCsv(array $fileData): void {
$form = $this->submitDatasourceForm($fileData['filename']);
- $csvObject = new CRM_Import_DataSource_Csv($form->getUserJobID());
+ $csvObject = new CRM_Import_DataSource_CSV($form->getUserJobID());
$rows = $csvObject->getRows(0, 0, [], FALSE);
foreach (['first_name', 'last_name', 'email'] as $field) {
$json = json_encode($rows[0][$field]);
*/
public function testBlankLineAtEnd(): void {
$form = $this->submitDatasourceForm('blankLineAtEnd.csv');
- $csvObject = new CRM_Import_DataSource_Csv($form->getUserJobID());
+ $csvObject = new CRM_Import_DataSource_CSV($form->getUserJobID());
$json = json_encode($csvObject->getRow()['email']);
$this->assertEquals('"yogi@yellowstone.park"', $json);
$this->assertEquals('ignore1@example.com', $value['email']);
$this->assertEquals(1, count($value['api.Address.get']['values']));
}
- CRM_core_DAO::executeQuery('DELETE FROM civicrm_address WHERE contact_id=%1', [
+ CRM_Core_DAO::executeQuery('DELETE FROM civicrm_address WHERE contact_id=%1', [
1 => [$this->noise['individual'], 'Positive'],
]);
$this->callAPISuccess('Contact', 'delete', [
* @return SettingsManager
*/
protected function createManager() {
- $cache = new \CRM_Utils_Cache_Arraycache([]);
+ $cache = new \CRM_Utils_Cache_ArrayCache([]);
$cache->set('defaults_domain', $this->domainDefaults);
$cache->set('defaults_contact', $this->contactDefaults);
foreach ($this->mandates as $entity => $keyValues) {