From a4ecaa21f97499dcc3cb53633e1049084587dadb Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 17 Nov 2021 16:20:55 -0800 Subject: [PATCH] EventChecker - Fix recent regression Overview -------- v5.43 introduced `Civi/Test/EventChecker.php` as part of the execution of all unit-tests. `civix` generates unit-tests from various templates. As part of the `civix` update-testing, it makes sundry tests with sundry phpunit. Before ------ In 5.43.0, when running `civix`'s` `tests/make-example.sh`, it fails on one of the tests when using an older version of phpunit. After ----- When running `civix`'s` `tests/make-example.sh`, it passes with all tests. Comment ------- The type-hint is too strong -- the actual type-name depends on the version of phpunit. It is, of course, good to have type-hints, and this preserves the softer `@param` hint. --- Civi/Test/EventChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Test/EventChecker.php b/Civi/Test/EventChecker.php index 1dc1e27ed0..1766bf541d 100644 --- a/Civi/Test/EventChecker.php +++ b/Civi/Test/EventChecker.php @@ -30,7 +30,7 @@ class EventChecker { * * @return $this */ - public function start(\PHPUnit\Framework\Test $test) { + public function start($test) { if ($this->activeChecks === NULL) { $this->activeChecks = []; foreach ($this->findAll() as $template) { -- 2.25.1