fix tests
This commit is contained in:
parent
f6911a76b1
commit
c6f73cf618
@ -44,7 +44,7 @@ func TestName(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -65,7 +65,7 @@ func TestFullyQualified(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -86,7 +86,7 @@ func TestRelative(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ func TestIdentifier(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -132,7 +132,7 @@ func TestArgumentNode(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -198,7 +198,7 @@ func TestParameterNode(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ func TestSimpleVar(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -56,7 +56,7 @@ func TestSimpleVarPropertyFetch(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -79,7 +79,7 @@ func TestDollarOpenCurlyBraces(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -105,7 +105,7 @@ func TestDollarOpenCurlyBracesDimNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -131,7 +131,7 @@ func TestCurlyOpenMethodCall(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
|
@ -22,7 +22,7 @@ func TestMagicConstant(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
|
@ -36,7 +36,7 @@ func TestLNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -52,7 +52,7 @@ func TestDNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -68,7 +68,7 @@ func TestFloat(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -84,7 +84,7 @@ func TestBinaryLNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -100,7 +100,7 @@ func TestBinaryDNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -116,7 +116,7 @@ func TestHLNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -132,7 +132,7 @@ func TestHDNumber(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ func TestDoubleQuotedScalarString(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -39,7 +39,7 @@ func TestDoubleQuotedScalarStringWithEscapedVar(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -59,7 +59,7 @@ func TestMultilineDoubleQuotedScalarString(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -77,7 +77,7 @@ func TestSingleQuotedScalarString(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -97,7 +97,7 @@ func TestMultilineSingleQuotedScalarString(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -118,7 +118,7 @@ CAD;
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -139,7 +139,7 @@ CAD;
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
@ -160,7 +160,7 @@ CAD;
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
if diff := pretty.Compare(expected, actual); diff != "" {
|
||||
t.Errorf("diff: (-expected +actual)\n%s", diff)
|
||||
|
@ -41,7 +41,7 @@ func TestAltIf(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -68,7 +68,7 @@ func TestAltElseIf(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -92,7 +92,7 @@ func TestAltElse(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@ -128,7 +128,7 @@ func TestAltElseElseIf(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.Parse(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user