diff --git a/tests/Support/SupportStrTest.php b/tests/Support/SupportStrTest.php index 425966353d29..a29252a0bff3 100755 --- a/tests/Support/SupportStrTest.php +++ b/tests/Support/SupportStrTest.php @@ -560,6 +560,17 @@ public function testWrap() $this->assertEquals('foo-bar-baz', Str::wrap('-bar-', 'foo', 'baz')); } + public function testWrapEdgeCases() + { + $this->assertSame('[]mid[]', Str::wrap('mid', '[]')); + $this->assertSame('(mid', Str::wrap('mid', '(', '')); + $this->assertSame('assertSame('value', Str::wrap('value', '')); + $this->assertSame('[][]', Str::wrap('', '[]')); + $this->assertSame('«値»', Str::wrap('値', '«', '»')); + $this->assertSame('🧪X🧪', Str::wrap('X', '🧪')); + } + public function testUnwrap() { $this->assertEquals('value', Str::unwrap('"value"', '"'));