mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-12 09:09:45 +01:00
32 lines
664 B
PHP
32 lines
664 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Str\Byte;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Str\Byte;
|
|
|
|
final class CapitalizeTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testCapitalize(string $expected, string $value): void
|
|
{
|
|
static::assertSame($expected, Byte\capitalize($value));
|
|
}
|
|
|
|
public function provideData(): array
|
|
{
|
|
return [
|
|
['', ''],
|
|
['Hello', 'hello', ],
|
|
['Hello, world', 'hello, world'],
|
|
['Alpha', 'Alpha', ],
|
|
['Héllö, wôrld!', 'héllö, wôrld!'],
|
|
['ßoo', 'ßoo'],
|
|
];
|
|
}
|
|
}
|