Cleanup dummy DAO in ruleGroupTest class
authorcolemanw <coleman@civicrm.org>
Wed, 3 Jan 2024 14:35:26 +0000 (09:35 -0500)
committercolemanw <coleman@civicrm.org>
Wed, 3 Jan 2024 14:35:54 +0000 (09:35 -0500)
The getReferenceColumns() is no longer needed and can just use the parent function.

tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php

index 1ad07687c0a63b72289b0511be04ceafd12f4dc1..9ee835ebab591853cada89b4ce0e78fe9a860c57 100644 (file)
@@ -2,18 +2,7 @@
 
 class CRM_Dedupe_DAO_TestEntity extends CRM_Core_DAO {
 
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic('civicrm_dedupe_test_table', 'contact_id', 'civicrm_contact', 'id');
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
+  public static $_tableName = 'civicrm_dedupe_test_table';
 
   /**
    * Returns all the column names of this table
@@ -38,6 +27,7 @@ class CRM_Dedupe_DAO_TestEntity extends CRM_Core_DAO {
           'table_name' => 'civicrm_dedupe_test_table',
           'entity' => 'TestEntity',
           'FKClassName' => 'CRM_Contact_DAO_Contact',
+          'FKColumnName' => 'id',
         ],
         'dedupe_test_field' => [
           'name' => 'dedupe_test_field',