Skip to content

Commit 650ca87

Browse files
authored
Add tests for ucsplit in stringable (#41499)
1 parent d39d92d commit 650ca87

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Support/SupportStringableTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ public function testWhenContainsAll()
150150
}));
151151
}
152152

153+
public function testUcsplitOnStringable()
154+
{
155+
$this->assertSame(['Taylor', 'Otwell'], $this->stringable('TaylorOtwell')->ucsplit()->toArray());
156+
$this->assertSame(['Hello', 'From', 'Laravel'], $this->stringable('HelloFromLaravel')->ucsplit()->toArray());
157+
$this->assertSame(['He_llo_', 'World'], $this->stringable('He_llo_World')->ucsplit()->toArray());
158+
}
159+
153160
public function testWhenEndsWith()
154161
{
155162
$this->assertSame('Tony Stark', (string) $this->stringable('tony stark')->whenEndsWith('ark', function ($stringable) {

0 commit comments

Comments
 (0)