mirror of
https://github.com/danog/amp.git
synced 2024-12-04 10:28:01 +01:00
2f778fe069
Removes deprecated APIs.
21 lines
434 B
PHP
21 lines
434 B
PHP
<?php
|
|
|
|
namespace Amp\Test\Pipeline;
|
|
|
|
use Amp\PHPUnit\AsyncTestCase;
|
|
use Amp\Pipeline;
|
|
use function Amp\await;
|
|
|
|
class DiscardTest extends AsyncTestCase
|
|
{
|
|
public function testEmpty(): void
|
|
{
|
|
self::assertSame(0, await(Pipeline\discard(Pipeline\fromIterable([]))));
|
|
}
|
|
|
|
public function testCount(): void
|
|
{
|
|
self::assertSame(3, await(Pipeline\discard(Pipeline\fromIterable(['a', 1, false], 1))));
|
|
}
|
|
}
|