Merge pull request #21945 from masetto/profile-data-attribute
[civicrm-core.git] / Civi / Test.php
index 1509481623588f1cbcccae85aee8e32f7f6313d9..3deca30fbc2862b12cc7a928e51e2eb83de0918b 100644 (file)
@@ -50,7 +50,7 @@ class Test {
   /**
    * Get the data source used for testing.
    *
-   * @param string|NULL $part
+   * @param string|null $part
    *   One of NULL, 'hostspec', 'port', 'username', 'password', 'database'.
    * @return string|array|NULL
    *   If $part is omitted, return full DSN array.
@@ -212,6 +212,16 @@ class Test {
     return $result['data'];
   }
 
+  /**
+   * @return \Civi\Test\EventChecker
+   */
+  public static function eventChecker() {
+    if (!isset(self::$singletons['eventChecker'])) {
+      self::$singletons['eventChecker'] = new \Civi\Test\EventChecker();
+    }
+    return self::$singletons['eventChecker'];
+  }
+
   /**
    * Prepare and execute a batch of SQL statements.
    *