diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-16 16:23:52 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-22 11:12:04 +0100 |
| commit | 50ddff94b9989342e66678c311b3abf4e7d5a074 (patch) | |
| tree | 3fca48356d0d2e1d752773cc9afb46c956b9bd03 | |
| parent | a3503f0402ce996466de966e8105448aba5114cf (diff) | |
| download | php-git-50ddff94b9989342e66678c311b3abf4e7d5a074.tar.gz | |
Make tokenizer test robust against token renumbering
| -rw-r--r-- | ext/tokenizer/tests/bug76437.phpt | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/ext/tokenizer/tests/bug76437.phpt b/ext/tokenizer/tests/bug76437.phpt index 348c9bdc00..114a0aa4bf 100644 --- a/ext/tokenizer/tests/bug76437.phpt +++ b/ext/tokenizer/tests/bug76437.phpt @@ -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) |
