Skip to content

Commit

Permalink
Add tests for ucsplit in stringable (#41499)
Browse files Browse the repository at this point in the history
  • Loading branch information
reziamini authored Mar 15, 2022
1 parent d39d92d commit 650ca87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Support/SupportStringableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ public function testWhenContainsAll()
}));
}

public function testUcsplitOnStringable()
{
$this->assertSame(['Taylor', 'Otwell'], $this->stringable('TaylorOtwell')->ucsplit()->toArray());
$this->assertSame(['Hello', 'From', 'Laravel'], $this->stringable('HelloFromLaravel')->ucsplit()->toArray());
$this->assertSame(['He_llo_', 'World'], $this->stringable('He_llo_World')->ucsplit()->toArray());
}

public function testWhenEndsWith()
{
$this->assertSame('Tony Stark', (string) $this->stringable('tony stark')->whenEndsWith('ark', function ($stringable) {
Expand Down

0 comments on commit 650ca87

Please sign in to comment.