mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add Composer autoloading functions and PHPStan for testing
This commit is contained in:
parent
e198c4db65
commit
f5d7d4e02a
1518 changed files with 169063 additions and 30 deletions
187
vendor/nikic/php-parser/test/code/parser/expr/new.test
vendored
Normal file
187
vendor/nikic/php-parser/test/code/parser/expr/new.test
vendored
Normal file
|
@ -0,0 +1,187 @@
|
|||
New
|
||||
-----
|
||||
<?php
|
||||
|
||||
new A;
|
||||
new A($b);
|
||||
|
||||
// class name variations
|
||||
new $a();
|
||||
new $a['b']();
|
||||
new A::$b();
|
||||
// DNCR object access
|
||||
new $a->b();
|
||||
new $a->b->c();
|
||||
new $a->b['c']();
|
||||
new $a->b{'c'}();
|
||||
|
||||
// test regression introduces by new dereferencing syntax
|
||||
(new A);
|
||||
-----
|
||||
array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Name(
|
||||
parts: array(
|
||||
0: A
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Name(
|
||||
parts: array(
|
||||
0: A
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
0: Arg(
|
||||
value: Expr_Variable(
|
||||
name: b
|
||||
)
|
||||
byRef: false
|
||||
unpack: false
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
2: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
comments: array(
|
||||
0: // class name variations
|
||||
)
|
||||
)
|
||||
comments: array(
|
||||
0: // class name variations
|
||||
)
|
||||
)
|
||||
3: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_ArrayDimFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
dim: Scalar_String(
|
||||
value: b
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
4: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_StaticPropertyFetch(
|
||||
class: Name(
|
||||
parts: array(
|
||||
0: A
|
||||
)
|
||||
)
|
||||
name: VarLikeIdentifier(
|
||||
name: b
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
5: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_PropertyFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
name: Identifier(
|
||||
name: b
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
comments: array(
|
||||
0: // DNCR object access
|
||||
)
|
||||
)
|
||||
comments: array(
|
||||
0: // DNCR object access
|
||||
)
|
||||
)
|
||||
6: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_PropertyFetch(
|
||||
var: Expr_PropertyFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
name: Identifier(
|
||||
name: b
|
||||
)
|
||||
)
|
||||
name: Identifier(
|
||||
name: c
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
7: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_ArrayDimFetch(
|
||||
var: Expr_PropertyFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
name: Identifier(
|
||||
name: b
|
||||
)
|
||||
)
|
||||
dim: Scalar_String(
|
||||
value: c
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
8: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Expr_ArrayDimFetch(
|
||||
var: Expr_PropertyFetch(
|
||||
var: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
name: Identifier(
|
||||
name: b
|
||||
)
|
||||
)
|
||||
dim: Scalar_String(
|
||||
value: c
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
9: Stmt_Expression(
|
||||
expr: Expr_New(
|
||||
class: Name(
|
||||
parts: array(
|
||||
0: A
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
comments: array(
|
||||
0: // test regression introduces by new dereferencing syntax
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue