1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 17:37:50 +01:00

Fixed phpunit-util, so Closure::fromCallable() not necessary

This commit is contained in:
Aaron Piotrowski 2021-12-02 17:47:30 -06:00
parent 79c57650ae
commit cfb527a9fc
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ class CancellationTest extends AsyncTestCase
public function testDoubleCancelOnlyInvokesOnce(): void public function testDoubleCancelOnlyInvokesOnce(): void
{ {
$cancellationSource = new DeferredCancellation; $cancellationSource = new DeferredCancellation;
$cancellationSource->getCancellation()->subscribe(\Closure::fromCallable($this->createCallback(1))); $cancellationSource->getCancellation()->subscribe($this->createCallback(1));
$cancellationSource->cancel(); $cancellationSource->cancel();
$cancellationSource->cancel(); $cancellationSource->cancel();
@ -58,6 +58,6 @@ class CancellationTest extends AsyncTestCase
{ {
$cancellationSource = new DeferredCancellation; $cancellationSource = new DeferredCancellation;
$cancellationSource->cancel(); $cancellationSource->cancel();
$cancellationSource->getCancellation()->subscribe(\Closure::fromCallable($this->createCallback(1))); $cancellationSource->getCancellation()->subscribe($this->createCallback(1));
} }
} }

View File

@ -210,7 +210,7 @@ class FutureTest extends AsyncTestCase
$deferred->error(new TestException); $deferred->error(new TestException);
unset($deferred); unset($deferred);
EventLoop::setErrorHandler(\Closure::fromCallable($this->createCallback(0))); EventLoop::setErrorHandler($this->createCallback(0));
} }
public function testIgnoreUnhandledErrorFromFutureError(): void public function testIgnoreUnhandledErrorFromFutureError(): void
@ -219,7 +219,7 @@ class FutureTest extends AsyncTestCase
$future->ignore(); $future->ignore();
unset($future); unset($future);
EventLoop::setErrorHandler(\Closure::fromCallable($this->createCallback(0))); EventLoop::setErrorHandler($this->createCallback(0));
} }
public function testMapWithCompleteFuture(): void public function testMapWithCompleteFuture(): void