From f3489e043f2afee147695e0f5caf822c8b5cc4e9 Mon Sep 17 00:00:00 2001 From: W0rma Date: Thu, 6 Mar 2025 22:41:48 +0100 Subject: [PATCH] Fix usage of TestCase::returnCallback() which was removed in PHPUnit 12 --- tests/unit/Codeception/Module/RestTest.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/tests/unit/Codeception/Module/RestTest.php b/tests/unit/Codeception/Module/RestTest.php index cd1c4e7..114800a 100644 --- a/tests/unit/Codeception/Module/RestTest.php +++ b/tests/unit/Codeception/Module/RestTest.php @@ -697,18 +697,16 @@ public function testRestExecute(string $configUrl, string $requestUrl, string $e $connectionModule ->expects($this->once()) ->method('_request') - ->will( - $this->returnCallback(function($method, - $uri, - $parameters, - $files, - $server, - $content - ) use ($expectedFullUrl) { - Assert::assertSame($expectedFullUrl, $uri); - return ''; - }) - ); + ->willReturnCallback(function($method, + $uri, + $parameters, + $files, + $server, + $content + ) use ($expectedFullUrl) { + Assert::assertSame($expectedFullUrl, $uri); + return ''; + }); $config = ['url' => $configUrl];