Skip to content

Commit 6cb0f0c

Browse files
authored
Fix usage of TestCase::returnCallback() which was removed in PHPUnit 12 (#113)
1 parent abb4f25 commit 6cb0f0c

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

tests/unit/Codeception/Module/RestTest.php

+10-12
Original file line numberDiff line numberDiff line change
@@ -697,18 +697,16 @@ public function testRestExecute(string $configUrl, string $requestUrl, string $e
697697
$connectionModule
698698
->expects($this->once())
699699
->method('_request')
700-
->will(
701-
$this->returnCallback(function($method,
702-
$uri,
703-
$parameters,
704-
$files,
705-
$server,
706-
$content
707-
) use ($expectedFullUrl) {
708-
Assert::assertSame($expectedFullUrl, $uri);
709-
return '';
710-
})
711-
);
700+
->willReturnCallback(function($method,
701+
$uri,
702+
$parameters,
703+
$files,
704+
$server,
705+
$content
706+
) use ($expectedFullUrl) {
707+
Assert::assertSame($expectedFullUrl, $uri);
708+
return '';
709+
});
712710

713711
$config = ['url' => $configUrl];
714712

0 commit comments

Comments
 (0)