Merge pull request #17390 from mattwire/api3activitydatetimedefault
[civicrm-core.git] / tests / phpunit / CRM / Utils / SystemTest.php
index 4cae4935b34c5fe54f8f091c7b0e184f14a7064e..f163a167989c04c2a8fa05f40bb23779fec5849d 100644 (file)
@@ -138,7 +138,7 @@ class CRM_Utils_SystemTest extends CiviUnitTestCase {
    * @dataProvider getExternURLs
    */
   public function testAlterExternUrlHook($path, $expected) {
-    Civi::service('dispatcher')->addListener('hook_civicrm_alterExternUrl', [$this, 'hook_civicrm_alterExternUrl']);
+    Civi::dispatcher()->addListener('hook_civicrm_alterExternUrl', [$this, 'hook_civicrm_alterExternUrl']);
     $externUrl = CRM_Utils_System::externUrl($path, $expected['query']);
     $this->assertContains('path/altered/by/hook', $externUrl, 'Hook failed to alter URL path');
     $this->assertContains($expected['query'] . '&thisWas=alteredByHook', $externUrl, 'Hook failed to alter URL query');