Skip to content

Commit 44a3c7a

Browse files
authored
Assert that the modifiers option is indeed deprecated (#1451)
1 parent 7633962 commit 44a3c7a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/Operation/FindFunctionalTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ function () use ($modifiers): void {
4848
['modifiers' => $modifiers],
4949
);
5050

51-
$operation->execute($this->getPrimaryServer());
51+
$this->assertDeprecated(
52+
fn () => $operation->execute($this->getPrimaryServer()),
53+
);
5254
},
5355
function (array $event) use ($expectedSort): void {
5456
$this->assertEquals($expectedSort, $event['started']->getCommand()->sort ?? null);

tests/TestCase.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use function sprintf;
3737
use function strtr;
3838

39+
use const E_DEPRECATED;
3940
use const E_USER_DEPRECATED;
4041

4142
abstract class TestCase extends BaseTestCase
@@ -171,7 +172,7 @@ protected function assertDeprecated(callable $execution): void
171172

172173
set_error_handler(function ($errno, $errstr) use (&$errors): void {
173174
$errors[] = $errstr;
174-
}, E_USER_DEPRECATED);
175+
}, E_USER_DEPRECATED | E_DEPRECATED);
175176

176177
try {
177178
call_user_func($execution);

0 commit comments

Comments
 (0)