mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-11 16:49:40 +01:00
29 lines
573 B
PHP
29 lines
573 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Str;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Str;
|
|
|
|
final class RepeatTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testRepeat(string $expected, string $string, int $multiplier): void
|
|
{
|
|
static::assertSame($expected, Str\repeat($string, $multiplier));
|
|
}
|
|
|
|
public function provideData(): array
|
|
{
|
|
return [
|
|
['a', 'a', 1],
|
|
['Go! Go! Go! ', 'Go! ', 3],
|
|
['مممممممممممم', 'م', 12],
|
|
];
|
|
}
|
|
}
|