mirror of
https://github.com/danog/amp.git
synced 2024-12-13 01:47:33 +01:00
2f778fe069
Removes deprecated APIs.
22 lines
491 B
PHP
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));
|
|
}
|
|
}
|