Skip to content

Commit 50ddff9

Browse files
committed
Make tokenizer test robust against token renumbering
1 parent a3503f0 commit 50ddff9

File tree

1 file changed

+5
-26
lines changed

1 file changed

+5
-26
lines changed

ext/tokenizer/tests/bug76437.phpt

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,15 @@ $tests = [
1212
foreach ($tests as [$code, $index]) {
1313
$open_tag1 = token_get_all($code)[$index];
1414
$open_tag2 = token_get_all($code, TOKEN_PARSE)[$index];
15-
var_dump($open_tag1);
15+
echo token_name($open_tag1[0]), ": \"$open_tag1[1]\" on line $open_tag1[2]\n";
1616
var_dump($open_tag1 === $open_tag2);
1717
}
1818
?>
1919
--EXPECT--
20-
array(3) {
21-
[0]=>
22-
int(380)
23-
[1]=>
24-
string(3) "<?="
25-
[2]=>
26-
int(1)
27-
}
20+
T_OPEN_TAG_WITH_ECHO: "<?=" on line 1
2821
bool(true)
29-
array(3) {
30-
[0]=>
31-
int(381)
32-
[1]=>
33-
string(2) "?>"
34-
[2]=>
35-
int(1)
36-
}
22+
T_CLOSE_TAG: "?>" on line 1
3723
bool(true)
38-
array(3) {
39-
[0]=>
40-
int(381)
41-
[1]=>
42-
string(3) "?>
43-
"
44-
[2]=>
45-
int(1)
46-
}
24+
T_CLOSE_TAG: "?>
25+
" on line 1
4726
bool(true)

0 commit comments

Comments
 (0)