Skip to content

Commit f7cb00d

Browse files
committed
Add missing canonicalization in test
1 parent 7dae6c7 commit f7cb00d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/PhpParser/NodeAbstractTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ function functionName(&$a = 0, $b = 1.0) {
227227
"comments": [
228228
{
229229
"nodeType": "Comment",
230-
"text": "\/\/ comment\r\n",
230+
"text": "\/\/ comment\n",
231231
"line": 2,
232-
"filePos": 7
232+
"filePos": 6
233233
},
234234
{
235235
"nodeType": "Comment_Doc",
236236
"text": "\/** doc comment *\/",
237237
"line": 3,
238-
"filePos": 19
238+
"filePos": 17
239239
}
240240
],
241241
"endLine": 6
@@ -245,7 +245,7 @@ function functionName(&$a = 0, $b = 1.0) {
245245
JSON;
246246

247247
$parser = new Parser\Php7(new Lexer());
248-
$stmts = $parser->parse($code);
248+
$stmts = $parser->parse(canonicalize($code));
249249
$json = json_encode($stmts, JSON_PRETTY_PRINT);
250250
$this->assertEquals(canonicalize($expected), canonicalize($json));
251251
}

0 commit comments

Comments
 (0)