From 1a42a406569b138035d74a58c2615a4e230d7342 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 25 Sep 2024 08:55:09 +0200 Subject: [PATCH] Assert that the modifiers option is indeed deprecated --- tests/Operation/FindFunctionalTest.php | 4 +++- tests/TestCase.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Operation/FindFunctionalTest.php b/tests/Operation/FindFunctionalTest.php index 2b70a421b..cc9720403 100644 --- a/tests/Operation/FindFunctionalTest.php +++ b/tests/Operation/FindFunctionalTest.php @@ -48,7 +48,9 @@ function () use ($modifiers): void { ['modifiers' => $modifiers], ); - $operation->execute($this->getPrimaryServer()); + $this->assertDeprecated( + fn () => $operation->execute($this->getPrimaryServer()), + ); }, function (array $event) use ($expectedSort): void { $this->assertEquals($expectedSort, $event['started']->getCommand()->sort ?? null); diff --git a/tests/TestCase.php b/tests/TestCase.php index b037c2908..87a951eed 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -36,6 +36,7 @@ use function sprintf; use function strtr; +use const E_DEPRECATED; use const E_USER_DEPRECATED; abstract class TestCase extends BaseTestCase @@ -171,7 +172,7 @@ protected function assertDeprecated(callable $execution): void set_error_handler(function ($errno, $errstr) use (&$errors): void { $errors[] = $errstr; - }, E_USER_DEPRECATED); + }, E_USER_DEPRECATED | E_DEPRECATED); try { call_user_func($execution);