[NFC] Fix capitalization of class names
authorBradley Taylor <hello@brad-taylor.co.uk>
Sun, 4 Jun 2023 08:25:42 +0000 (09:25 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sun, 4 Jun 2023 08:29:18 +0000 (09:29 +0100)
tests/phpunit/CRM/Contact/Page/View/NoteTest.php
tests/phpunit/CRM/Core/CommunityMessagesTest.php
tests/phpunit/CRM/Core/Payment/PayPalIPNTest.php
tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php
tests/phpunit/CRM/Core/Resources/StringsTest.php
tests/phpunit/CRM/Core/ResourcesTest.php
tests/phpunit/CRM/Extension/Container/BasicTest.php
tests/phpunit/CRM/Extension/Container/CollectionTest.php
tests/phpunit/CRM/Import/DataSource/CsvTest.php
tests/phpunit/CRM/Utils/API/MatchOptionTest.php
tests/phpunit/Civi/Core/SettingsManagerTest.php

index c8bb6bc5ff312d7338d37c77a73e0aa04ebbabf8..57e91cbac67baff6922869ca7b1bd8fb9f9a7205 100644 (file)
@@ -33,7 +33,7 @@ class CRM_Contact_Page_View_NoteTest extends CiviUnitTestCase {
     }
     $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) {
index 58af475f177cff44fe762977b1bcd5ccd455dd16..34104e7cb8ac8a6dfd935dd7d302ded65165931e 100644 (file)
@@ -125,7 +125,7 @@ class CRM_Core_CommunityMessagesTest extends CiviUnitTestCase {
 
   public function setUp(): void {
     parent::setUp();
-    $this->cache = new CRM_Utils_Cache_Arraycache([]);
+    $this->cache = new CRM_Utils_Cache_ArrayCache([]);
     self::initWebResponses();
   }
 
index 5ebb55ad363325bd11e5ce6d415cd1f6cf6192b2..931a568d2b47cab435d8c83b3fe4dbc8fd20e8be 100644 (file)
@@ -180,7 +180,7 @@ class CRM_Core_Payment_PayPalIPNTest extends CiviUnitTestCase {
     $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']));
index a486dba31e0a477cbdc502363df86b38bc5b9002..b96a15f6f1c4302fa11ed9472c582a2365bbf111 100644 (file)
@@ -112,7 +112,7 @@ class CRM_Core_Payment_PayPalProIPNTest extends CiviUnitTestCase {
     $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);
index 0ff41ebf6b584bb2162cb009cec555c85c5063a7..6196c688ca86440c530562e5b50066b67b2f89a9 100644 (file)
@@ -22,7 +22,7 @@ class CRM_Core_Resources_StringsTest extends CiviUnitTestCase {
   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'],
index ca838ee6862b148b447b801c95340874dd788b63..425f56bf2c313268c4df8a0e6922c81809fdbdcb 100644 (file)
@@ -41,7 +41,7 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase {
     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);
index 9529e868d45462dcd972ed62c6af182e6806a85f..a36edc3886fabd0aeadf0281daceaa8ce097a508 100644 (file)
@@ -74,7 +74,7 @@ class CRM_Extension_Container_BasicTest extends CiviUnitTestCase {
   }
 
   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'));
index 6849b279224fec01d85410ab2065b853fc6d9b7b..9ecba0b5a49e9ac53044c138ade77e7cbac039ae 100644 (file)
@@ -66,7 +66,7 @@ class CRM_Extension_Container_CollectionTest extends CiviUnitTestCase {
   }
 
   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'));
index fe4ed7829db86bb50327d95ef9d3aa6d8a4290b3..c006c24b3ca2749a1087187f6e8b851c6cd0bd1d 100644 (file)
@@ -36,7 +36,7 @@ class CRM_Import_DataSource_CsvTest extends CiviUnitTestCase {
    */
   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]);
@@ -137,7 +137,7 @@ class CRM_Import_DataSource_CsvTest extends CiviUnitTestCase {
    */
   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);
index 32bc748f869be5560c4022d72bb9f1b0ae44b1e6..c581d9b2e0b9d1e5eda8bbc178ace907d6e0da1f 100644 (file)
@@ -39,7 +39,7 @@ class CRM_Utils_API_MatchOptionTest extends CiviUnitTestCase {
       $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', [
index 69ea7f4a9661e571459ed7b7cb62e2e66d4f3687..344d28ddf8810109108c80a1d9400995c010dd8c 100644 (file)
@@ -131,7 +131,7 @@ class SettingsManagerTest extends \CiviUnitTestCase {
    * @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) {