Skip to content

Commit ab7c362

Browse files
committed
Add test
1 parent 10590f6 commit ab7c362

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
PhpToken implements __toString()
3+
--FILE--
4+
<?php
5+
6+
$tokens = PhpToken::getAll('<?php echo "Hello ". $what;');
7+
var_dump(implode($tokens));
8+
9+
var_dump($tokens[0] instanceof Stringable);
10+
var_dump((string) $tokens[0]);
11+
var_dump($tokens[0]->__toString());
12+
13+
?>
14+
--EXPECT--
15+
string(27) "<?php echo "Hello ". $what;"
16+
bool(true)
17+
string(6) "<?php "
18+
string(6) "<?php "

0 commit comments

Comments
 (0)