From 74496017b051e06fd7ca4a6c44bcef33ffe3912a Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 12 Aug 2020 21:57:48 -0400 Subject: [PATCH] remove test for deprecated way of calling hook --- tests/phpunit/E2E/Core/HookTest.php | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/tests/phpunit/E2E/Core/HookTest.php b/tests/phpunit/E2E/Core/HookTest.php index 8043c0b34c..bfadfe0838 100644 --- a/tests/phpunit/E2E/Core/HookTest.php +++ b/tests/phpunit/E2E/Core/HookTest.php @@ -38,35 +38,6 @@ class HookTest extends \CiviEndToEndTestCase { } } - /** - * This test ensures that CRM_Utils_Hook::invoke() dispatches via Symfony. - * - * This should be *in*addition* to dispatching through the UF event system, - * although the mechanics depend on the UF, so that part has to be tested per-UF. - * - * This uses the deprecated form, `CRM_Utils_Hook::invoke(int $count...)` - */ - public function testSymfonyListener_int() { - $calls = 0; - $hookExample = function ($e) use (&$calls) { - $calls++; - $e->arg1['foo'] = 'a.num'; - $e->arg2->bar = 'b.num'; - }; - \Civi::dispatcher()->addListener('hook_civicrm_e2eHookExample', $hookExample); - try { - $a = []; - $b = new \stdClass(); - $this->hookStub(2, $a, $b); - $this->assertEquals(1, $calls); - $this->assertEquals('a.num', $a['foo']); - $this->assertEquals('b.num', $b->bar); - } - finally { - \Civi::dispatcher()->removeListener('hook_civicrm_e2eHookExample', $hookExample); - } - } - /** * @param mixed $names * @param array $a -- 2.25.1