mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Remove unnecessary usages of Amp\wrap
This commit is contained in:
parent
4f8b656513
commit
4577f92625
@ -23,7 +23,7 @@ class ProducerTest extends TestCase {
|
||||
|
||||
public function testEmit() {
|
||||
$invoked = false;
|
||||
Loop::run(Amp\wrap(function () use (&$invoked) {
|
||||
Loop::run(function () use (&$invoked) {
|
||||
$value = 1;
|
||||
|
||||
$producer = new Producer(function (callable $emit) use ($value) {
|
||||
@ -42,7 +42,7 @@ class ProducerTest extends TestCase {
|
||||
$producer->onResolve(function ($exception, $result) use ($value) {
|
||||
$this->assertSame($result, $value);
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
$this->assertTrue($invoked);
|
||||
}
|
||||
|
@ -179,10 +179,10 @@ class StreamIteratorTest extends TestCase {
|
||||
* @expectedExceptionMessage The stream has not resolved
|
||||
*/
|
||||
public function testGetResultBeforeResolution() {
|
||||
Loop::run(Amp\wrap(function () {
|
||||
Loop::run(function () {
|
||||
$streamIterator = new StreamIterator((new Emitter)->stream());
|
||||
$streamIterator->getResult();
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user