mirror of
https://github.com/danog/amp.git
synced 2024-12-13 01:47:33 +01:00
20 lines
412 B
PHP
20 lines
412 B
PHP
<?php
|
|
|
|
namespace Amp\Test\Pipeline;
|
|
|
|
use Amp\PHPUnit\AsyncTestCase;
|
|
use Amp\Pipeline;
|
|
|
|
class DiscardTest extends AsyncTestCase
|
|
{
|
|
public function testEmpty(): void
|
|
{
|
|
self::assertSame(0, Pipeline\discard(Pipeline\fromIterable([]))->join());
|
|
}
|
|
|
|
public function testCount(): void
|
|
{
|
|
self::assertSame(3, Pipeline\discard(Pipeline\fromIterable(['a', 1, false], 1))->join());
|
|
}
|
|
}
|