diff --git a/tests/Support/SupportStrTest.php b/tests/Support/SupportStrTest.php index 78d970cc5091..909699b7a266 100755 --- a/tests/Support/SupportStrTest.php +++ b/tests/Support/SupportStrTest.php @@ -37,6 +37,17 @@ public function testStringTitle() { $this->assertSame('Jefferson Costella', Str::title('jefferson costella')); $this->assertSame('Jefferson Costella', Str::title('jefFErson coSTella')); + + $this->assertSame('', Str::title('')); + $this->assertSame('123 Laravel', Str::title('123 laravel')); + $this->assertSame('❤Laravel', Str::title('❤laravel')); + $this->assertSame('Laravel ❤', Str::title('laravel ❤')); + $this->assertSame('Laravel123', Str::title('laravel123')); + $this->assertSame('Laravel123', Str::title('Laravel123')); + + $longString = 'lorem ipsum '.str_repeat('dolor sit amet ', 1000); + $expectedResult = 'Lorem Ipsum Dolor Sit Amet '.str_repeat('Dolor Sit Amet ', 999); + $this->assertSame($expectedResult, Str::title($longString)); } public function testStringHeadline()