Skip to content

Commit 686d2e9

Browse files
committed
Add test for Stringable with optional interfaces
1 parent 1386ca2 commit 686d2e9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Adding stringable is not broken with Optional interfaces
3+
--FILE--
4+
<?php
5+
6+
trait Str
7+
{
8+
public function __toString() {}
9+
}
10+
11+
class TestClass implements ?NonexistantInterface
12+
{
13+
use Str;
14+
}
15+
16+
echo implode(',', class_implements('TestClass'));
17+
18+
?>
19+
--EXPECT--
20+
Stringable

0 commit comments

Comments
 (0)