File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55use Amp \DeferredFuture ;
66use Amp \Future ;
77use PHPUnit \Framework \AssertionFailedError ;
8- use PHPUnit \Framework \MockObject \MockObject ;
98use PHPUnit \Framework \TestCase as PHPUnitTestCase ;
109use Revolt \EventLoop ;
1110use Revolt \EventLoop \Driver \TracingDriver ;
@@ -193,9 +192,9 @@ final protected function setTimeout(float $seconds): void
193192 * @param int $invocationCount Number of times the callback must be invoked or the test will fail.
194193 * @param callable|null $returnCallback Callable providing a return value for the callback.
195194 *
196- * @return \Closure&MockObject Mock object having only an __invoke method.
195+ * @return \Closure
197196 */
198- final protected function createCallback (int $ invocationCount , callable $ returnCallback = null ): \Closure
197+ final protected function createCallback (int $ invocationCount , ? callable $ returnCallback = null ): \Closure
199198 {
200199 $ mock = $ this ->createMock (CallbackStub::class);
201200 $ invocationMocker = $ mock ->expects (self ::exactly ($ invocationCount ))
You can’t perform that action at this time.
0 commit comments