Browse files

Add missing canonicalization in test

  • Loading branch information...
1 parent 7dae6c7 commit f7cb00d6d30a5e90892924f2b1b2545f779c1c6e @nikic committed Jul 25, 2016
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/PhpParser/NodeAbstractTest.php
View
8 test/PhpParser/NodeAbstractTest.php
@@ -227,15 +227,15 @@ function functionName(&$a = 0, $b = 1.0) {
"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 @@ function functionName(&$a = 0, $b = 1.0) {
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));
}

0 comments on commit f7cb00d

Please sign in to comment.