Skip to content

Commit

Permalink
Assert that the modifiers option is indeed deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Sep 25, 2024
1 parent 7633962 commit 816f2ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/Operation/FindFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,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);

Check failure on line 174 in tests/TestCase.php

View workflow job for this annotation

GitHub Actions / phpcs

Constant E_DEPRECATED should not be referenced via a fallback global name, but via a use statement.

try {
call_user_func($execution);
Expand Down

0 comments on commit 816f2ca

Please sign in to comment.