fix tests
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/kylelemons/godebug/pretty"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/node/stmt"
|
||||
"github.com/z7zmey/php-parser/parser"
|
||||
"github.com/z7zmey/php-parser/php7"
|
||||
)
|
||||
|
||||
func assertEqual(t *testing.T, expected interface{}, actual interface{}) {
|
||||
@@ -41,7 +41,7 @@ func TestAltIf(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@@ -68,7 +68,7 @@ func TestAltElseIf(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@@ -92,7 +92,7 @@ func TestAltElse(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
@@ -128,7 +128,7 @@ func TestAltElseElseIf(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _ := parser.ParsePhp7(bytes.NewBufferString(src), "test.php")
|
||||
actual, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user