issue #8: update tests
This commit is contained in:
@@ -44,10 +44,14 @@ func TestName(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php")
|
||||
php7parser.Parse()
|
||||
actual := php7parser.GetRootNode()
|
||||
assertEqual(t, expected, actual)
|
||||
|
||||
actual, _, _, _ = php5.Parse(bytes.NewBufferString(src), "test.php")
|
||||
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
|
||||
php5parser.Parse()
|
||||
actual = php5parser.GetRootNode()
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
||||
@@ -67,10 +71,14 @@ func TestFullyQualified(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php")
|
||||
php7parser.Parse()
|
||||
actual := php7parser.GetRootNode()
|
||||
assertEqual(t, expected, actual)
|
||||
|
||||
actual, _, _, _ = php5.Parse(bytes.NewBufferString(src), "test.php")
|
||||
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
|
||||
php5parser.Parse()
|
||||
actual = php5parser.GetRootNode()
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
||||
@@ -90,10 +98,14 @@ func TestRelative(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
actual, _, _, _ := php7.Parse(bytes.NewBufferString(src), "test.php")
|
||||
php7parser := php7.NewParser(bytes.NewBufferString(src), "test.php")
|
||||
php7parser.Parse()
|
||||
actual := php7parser.GetRootNode()
|
||||
assertEqual(t, expected, actual)
|
||||
|
||||
actual, _, _, _ = php5.Parse(bytes.NewBufferString(src), "test.php")
|
||||
php5parser := php5.NewParser(bytes.NewBufferString(src), "test.php")
|
||||
php5parser.Parse()
|
||||
actual = php5parser.GetRootNode()
|
||||
assertEqual(t, expected, actual)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user