php5 test coverage

This commit is contained in:
z7zmey
2018-02-13 14:58:10 +02:00
parent 5faf9769cf
commit a6fb7fc8a9
3 changed files with 166 additions and 28 deletions

View File

@@ -347,6 +347,10 @@ CAD;
(new \Foo())->bar()->baz;
(new \Foo())[0][0];
(new \Foo())[0]->bar();
array([0])[0][0];
"foo"[0];
foo[0];
`
expectedParams := []node.Node{
@@ -2684,6 +2688,47 @@ CAD;
Arguments: []node.Node{},
},
},
&stmt.Expression{
Expr: &expr.ArrayDimFetch{
Variable: &expr.ArrayDimFetch{
Variable: &expr.Array{
Items: []node.Node{
&expr.ArrayItem{
ByRef: false,
Val: &expr.ShortArray{
Items: []node.Node{
&expr.ArrayItem{
ByRef: false,
Val: &scalar.Lnumber{Value: "0"},
},
},
},
},
},
},
Dim: &scalar.Lnumber{Value: "0"},
},
Dim: &scalar.Lnumber{Value: "0"},
},
},
&stmt.Expression{
Expr: &expr.ArrayDimFetch{
Variable: &scalar.String{Value: "\"foo\""},
Dim: &scalar.Lnumber{Value: "0"},
},
},
&stmt.Expression{
Expr: &expr.ArrayDimFetch{
Variable: &expr.ConstFetch{
Constant: &name.Name{
Parts: []node.Node{
&name.NamePart{Value: "foo"},
},
},
},
Dim: &scalar.Lnumber{Value: "0"},
},
},
},
}