From 50d258a997667bae321c1470bd5768148cdf1bf3 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Thu, 8 Feb 2024 16:09:20 -0400 Subject: [PATCH] Removed unnecessary Dispatcher::tests() --- tests/DispatcherTest.php | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index 6cb628d..921aa97 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -193,7 +193,7 @@ class DispatcherTest extends TestCase ->set('myMethod', function (): string { return 'Original'; }) - ->hook('myMethod', 'invalid', function (array &$params, $output): void { + ->hook('myMethod', 'invalid', function (array &$params, &$output): void { $output = 'Overriden'; }); @@ -216,30 +216,6 @@ class DispatcherTest extends TestCase Dispatcher::filter([$validCallable, $invalidCallable], $params, $output); } - public function testCallFunction4Params(): void - { - $myFunction = function ($param1, $param2, $param3, $param4) { - return "hello{$param1}{$param2}{$param3}{$param4}"; - }; - - $params = ['param1', 'param2', 'param3', 'param4']; - $result = Dispatcher::callFunction($myFunction, $params); - - $this->assertSame('helloparam1param2param3param4', $result); - } - - public function testCallFunction5Params(): void - { - $myFunction = function ($param1, $param2, $param3, $param4, $param5) { - return "hello{$param1}{$param2}{$param3}{$param4}{$param5}"; - }; - - $params = ['param1', 'param2', 'param3', 'param4', 'param5']; - $result = Dispatcher::callFunction($myFunction, $params); - - $this->assertSame('helloparam1param2param3param4param5', $result); - } - public function testCallFunction6Params(): void { $func = function ($param1, $param2, $param3, $param4, $param5, $param6) {