mirror of
https://github.com/danog/amp.git
synced 2024-12-02 09:27:46 +01:00
Fixed phpunit-util, so Closure::fromCallable() not necessary
This commit is contained in:
parent
79c57650ae
commit
cfb527a9fc
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user