From cfb527a9fc7d3ce5ad5ab4df67fe218f87fd38fe Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Thu, 2 Dec 2021 17:47:30 -0600 Subject: [PATCH] Fixed phpunit-util, so Closure::fromCallable() not necessary --- test/Cancellation/CancellationTest.php | 4 ++-- test/Future/FutureTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Cancellation/CancellationTest.php b/test/Cancellation/CancellationTest.php index e85a899..603c8e3 100644 --- a/test/Cancellation/CancellationTest.php +++ b/test/Cancellation/CancellationTest.php @@ -48,7 +48,7 @@ class CancellationTest extends AsyncTestCase public function testDoubleCancelOnlyInvokesOnce(): void { $cancellationSource = new DeferredCancellation; - $cancellationSource->getCancellation()->subscribe(\Closure::fromCallable($this->createCallback(1))); + $cancellationSource->getCancellation()->subscribe($this->createCallback(1)); $cancellationSource->cancel(); $cancellationSource->cancel(); @@ -58,6 +58,6 @@ class CancellationTest extends AsyncTestCase { $cancellationSource = new DeferredCancellation; $cancellationSource->cancel(); - $cancellationSource->getCancellation()->subscribe(\Closure::fromCallable($this->createCallback(1))); + $cancellationSource->getCancellation()->subscribe($this->createCallback(1)); } } diff --git a/test/Future/FutureTest.php b/test/Future/FutureTest.php index 200d7f5..482100d 100644 --- a/test/Future/FutureTest.php +++ b/test/Future/FutureTest.php @@ -210,7 +210,7 @@ class FutureTest extends AsyncTestCase $deferred->error(new TestException); unset($deferred); - EventLoop::setErrorHandler(\Closure::fromCallable($this->createCallback(0))); + EventLoop::setErrorHandler($this->createCallback(0)); } public function testIgnoreUnhandledErrorFromFutureError(): void @@ -219,7 +219,7 @@ class FutureTest extends AsyncTestCase $future->ignore(); unset($future); - EventLoop::setErrorHandler(\Closure::fromCallable($this->createCallback(0))); + EventLoop::setErrorHandler($this->createCallback(0)); } public function testMapWithCompleteFuture(): void