mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-02 17:56:09 +01:00
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Str;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Str;
|
|
|
|
class CapitalizeTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testCapitalize(string $expected, string $value): void
|
|
{
|
|
self::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'],
|
|
['🤷 🔥', '🤷 🔥'],
|
|
['سيف', 'سيف'],
|
|
['你好', '你好'],
|
|
['こんにちは世界', 'こんにちは世界'],
|
|
['สวัสดี', 'สวัสดี'],
|
|
['ؤخى', 'ؤخى']
|
|
];
|
|
}
|
|
}
|