]> granicus.if.org Git - php/commitdiff
Make tokenizer test robust against token renumbering
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 16 Jan 2019 15:23:52 +0000 (16:23 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Jan 2019 10:12:04 +0000 (11:12 +0100)
ext/tokenizer/tests/bug76437.phpt

index 348c9bdc0053233ffa0e1ec9b02979f18eb3292d..114a0aa4bf82e1e79a4b46068ccd021702e7655b 100644 (file)
@@ -12,36 +12,15 @@ $tests = [
 foreach ($tests as [$code, $index]) {
     $open_tag1 = token_get_all($code)[$index];
     $open_tag2 = token_get_all($code, TOKEN_PARSE)[$index];
-    var_dump($open_tag1);
+    echo token_name($open_tag1[0]), ": \"$open_tag1[1]\" on line $open_tag1[2]\n";
     var_dump($open_tag1 === $open_tag2);
 }
 ?>
 --EXPECT--
-array(3) {
-  [0]=>
-  int(380)
-  [1]=>
-  string(3) "<?="
-  [2]=>
-  int(1)
-}
+T_OPEN_TAG_WITH_ECHO: "<?=" on line 1
 bool(true)
-array(3) {
-  [0]=>
-  int(381)
-  [1]=>
-  string(2) "?>"
-  [2]=>
-  int(1)
-}
+T_CLOSE_TAG: "?>" on line 1
 bool(true)
-array(3) {
-  [0]=>
-  int(381)
-  [1]=>
-  string(3) "?>
-"
-  [2]=>
-  int(1)
-}
+T_CLOSE_TAG: "?>
+" on line 1
 bool(true)