mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 05:11:39 +01:00
Add missing canonicalization in test
This commit is contained in:
parent
7dae6c7a6b
commit
f7cb00d6d3
@ -227,15 +227,15 @@ PHP;
|
||||
"comments": [
|
||||
{
|
||||
"nodeType": "Comment",
|
||||
"text": "\/\/ comment\r\n",
|
||||
"text": "\/\/ comment\n",
|
||||
"line": 2,
|
||||
"filePos": 7
|
||||
"filePos": 6
|
||||
},
|
||||
{
|
||||
"nodeType": "Comment_Doc",
|
||||
"text": "\/** doc comment *\/",
|
||||
"line": 3,
|
||||
"filePos": 19
|
||||
"filePos": 17
|
||||
}
|
||||
],
|
||||
"endLine": 6
|
||||
@ -245,7 +245,7 @@ PHP;
|
||||
JSON;
|
||||
|
||||
$parser = new Parser\Php7(new Lexer());
|
||||
$stmts = $parser->parse($code);
|
||||
$stmts = $parser->parse(canonicalize($code));
|
||||
$json = json_encode($stmts, JSON_PRETTY_PRINT);
|
||||
$this->assertEquals(canonicalize($expected), canonicalize($json));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user