Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tokenizer / numeric separators backfill: improve the unit tests
Test case file: 1. Remove a stray invisible whitespace character/null byte from the test case file. 2. Add a large number of additional test cases. Test file `testBackfill()`: 1. Fixed reversed order of the parameters in the `assertSame()`. The first parameter is `$expected`, the second `$result`. Having the parameters in the correct order makes debugging the tests easier as the messages send by PHPUnit will be correct. 2. Test that the final token has the correct code **and** the correct type. 3. Correct the expected type for two test cases based on how PHP 7.4 tokenizes these. 4. Add datasets for the new test cases which are to be handled by the backfill. Test file new `testNoBackfil()` Add test that numbers using numeric separators which are considered parse errors and/or which aren't relevant to the backfill, do not incorrectly trigger the backfill anyway. This test verifies that the final token sequence is in line with the token sequence PHP 7.4 would give. ADD TO: unit tests
- Loading branch information