mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-11 16:49:40 +01:00
24 lines
509 B
PHP
24 lines
509 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Iter;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Iter;
|
|
|
|
final 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]);
|
|
}
|
|
}
|