endtoend-test-psl/tests/Psl/Str/Byte/CapitalizeWordsTest.php
2020-01-02 00:00:08 +01:00

31 lines
675 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Str\Byte;
use PHPUnit\Framework\TestCase;
use Psl\Str\Byte;
class CapitalizeWordsTest extends TestCase
{
/**
* @dataProvider provideData
*/
public function testCapitalizeWords(string $expected, string $value): void
{
self::assertSame($expected, Byte\capitalize_words($value));
}
public function provideData(): array
{
return [
['Hello', 'hello', ],
['Hello, World', 'hello, world'],
['ḫello, ꝡorld', 'ḫello, ꝡorld'],
['Alpha', 'Alpha', ],
['Foo, Bar, And Baz', 'foo, bar, and baz']
];
}
}