mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-11 16:49:40 +01:00
28 lines
519 B
PHP
28 lines
519 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl;
|
|
|
|
class SequenceTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testSequence(array $args, $expected): void
|
|
{
|
|
$this->assertSame($expected, Psl\sequence(...$args));
|
|
}
|
|
|
|
public function provideData(): iterable
|
|
{
|
|
yield [[], null];
|
|
yield [[null], null];
|
|
yield [[1, 2, 3], 3];
|
|
yield [['foo', 'bar', 'baz', 'qux'], 'qux'];
|
|
}
|
|
}
|