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