Merge pull request #15810 from eileenmcnaughton/mem_fix
[civicrm-core.git] / tests / phpunit / CRM / Core / DAOTest.php
index fea1a1aefe6046ee02f1dfac24b41151cc62e17e..32e8e38babb3c084a07ff4b7e4385702e4d5b629 100644 (file)
@@ -483,7 +483,10 @@ class CRM_Core_DAOTest extends CiviUnitTestCase {
    * @throws \Exception
    */
   public function testModifyQuery() {
-    $listener = function(\Civi\Core\Event\GenericHookEvent $e) {
+    /**
+     * @param \Civi\Core\Event\QueryEvent $e
+     */
+    $listener = function($e) {
       $e->query = '/* User :  hooked */' . $e->query;
     };
     Civi::dispatcher()->addListener('civi.db.query', $listener);
@@ -498,7 +501,10 @@ class CRM_Core_DAOTest extends CiviUnitTestCase {
    * Demonstrate it is modified showing the query now breaks.
    */
   public function testModifyAndBreakQuery() {
-    $listener = function(\Civi\Core\Event\GenericHookEvent $e) {
+    /**
+     * @param \Civi\Core\Event\QueryEvent $e
+     */
+    $listener = function($e) {
       $e->query = '/* Forgot trailing comment marker' . $e->query;
     };
     Civi::dispatcher()->addListener('civi.db.query', $listener);