mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-02 17:56:09 +01:00
32 lines
656 B
PHP
32 lines
656 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Str\Byte;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Str\Byte;
|
|
|
|
class CapitalizeTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testCapitalize(string $expected, string $value): void
|
|
{
|
|
self::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'],
|
|
];
|
|
}
|
|
}
|