endtoend-test-psl/tests/Psl/Str/CapitalizeTest.php
2020-10-15 11:05:30 +02:00

41 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Str;
use PHPUnit\Framework\TestCase;
use Psl\Str;
final class CapitalizeTest extends TestCase
{
/**
* @dataProvider provideData
*/
public function testCapitalize(string $expected, string $value): void
{
static::assertSame($expected, Str\capitalize($value));
}
public function provideData(): array
{
return [
['', ''],
['Hello', 'hello', ],
['Hello, world', 'hello, world'],
['Alpha', 'Alpha', ],
['مرحبا بكم', 'مرحبا بكم'],
['Héllö, wôrld!', 'héllö, wôrld!'],
['Ḫéllö, wôrld!', 'ḫéllö, wôrld!'],
['SSoo', 'ßoo'],
['ẞoo', 'ẞoo'],
['🤷 🔥', '🤷 🔥'],
['سيف', 'سيف'],
['你好', '你好'],
['こんにちは世界', 'こんにちは世界'],
['สวัสดี', 'สวัสดี'],
['ؤخى', 'ؤخى']
];
}
}