1
0
mirror of https://github.com/danog/amp.git synced 2024-12-03 09:57:51 +01:00
amp/test/Pipeline/ToArrayTest.php
Niklas Keller 2f778fe069 Use revolt
Removes deprecated APIs.
2021-03-26 22:34:32 +01:00

22 lines
491 B
PHP

<?php
namespace Amp\Test\Pipeline;
use Amp\PHPUnit\AsyncTestCase;
use Amp\Pipeline;
class ToArrayTest extends AsyncTestCase
{
public function testNonEmpty(): void
{
$pipeline = Pipeline\fromIterable(["abc", "foo", "bar"], 5);
self::assertSame(["abc", "foo", "bar"], Pipeline\toArray($pipeline));
}
public function testEmpty(): void
{
$pipeline = Pipeline\fromIterable([], 5);
self::assertSame([], Pipeline\toArray($pipeline));
}
}