mirror of
https://github.com/danog/amp.git
synced 2024-12-02 17:37:50 +01:00
Rename missed Pause to Delayed
This commit is contained in:
parent
835e617054
commit
b5770ba64a
@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
namespace Amp\Test;
|
namespace Amp\Test;
|
||||||
|
|
||||||
|
use Amp\Delayed;
|
||||||
use Amp\Iterator;
|
use Amp\Iterator;
|
||||||
use Amp\Loop;
|
use Amp\Loop;
|
||||||
use Amp\Pause;
|
|
||||||
use Amp\PHPUnit\TestException;
|
use Amp\PHPUnit\TestException;
|
||||||
use Amp\Producer;
|
use Amp\Producer;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class MergeTest extends \PHPUnit\Framework\TestCase {
|
class MergeTest extends TestCase {
|
||||||
public function getArrays() {
|
public function getArrays() {
|
||||||
return [
|
return [
|
||||||
[[\range(1, 3), \range(4, 6)], [1, 4, 2, 5, 3, 6]],
|
[[\range(1, 3), \range(4, 6)], [1, 4, 2, 5, 3, 6]],
|
||||||
@ -43,8 +44,8 @@ class MergeTest extends \PHPUnit\Framework\TestCase {
|
|||||||
public function testMergeWithDelayedEmits() {
|
public function testMergeWithDelayedEmits() {
|
||||||
Loop::run(function () {
|
Loop::run(function () {
|
||||||
$iterators = [];
|
$iterators = [];
|
||||||
$values1 = [new Pause(10, 1), new Pause(50, 2), new Pause(70, 3)];
|
$values1 = [new Delayed(10, 1), new Delayed(50, 2), new Delayed(70, 3)];
|
||||||
$values2 = [new Pause(20, 4), new Pause(40, 5), new Pause(60, 6)];
|
$values2 = [new Delayed(20, 4), new Delayed(40, 5), new Delayed(60, 6)];
|
||||||
$expected = [1, 4, 5, 2, 6, 3];
|
$expected = [1, 4, 5, 2, 6, 3];
|
||||||
|
|
||||||
$iterators[] = new Producer(function (callable $emit) use ($values1) {
|
$iterators[] = new Producer(function (callable $emit) use ($values1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user