endtoend-test-psl/tests/Psl/Iter/MergeTest.php
2020-09-01 06:52:09 +01:00

24 lines
503 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Iter;
use PHPUnit\Framework\TestCase;
use Psl\Iter;
class MergeTest extends TestCase
{
public function testMap(): void
{
$result = Iter\merge([1, 2], [9, 8]);
$entries = Iter\to_array(Iter\enumerate($result));
static::assertSame($entries[0], [0, 1]);
static::assertSame($entries[1], [1, 2]);
static::assertSame($entries[2], [0, 9]);
static::assertSame($entries[3], [1, 8]);
}
}