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
144
vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test
vendored
Normal file
144
vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test
vendored
Normal file
|
@ -0,0 +1,144 @@
|
|||
Try/catch
|
||||
-----
|
||||
<?php
|
||||
|
||||
try {
|
||||
doTry();
|
||||
} catch (A $b) {
|
||||
doCatchA();
|
||||
} catch (B $c) {
|
||||
doCatchB();
|
||||
} finally {
|
||||
doFinally();
|
||||
}
|
||||
|
||||
// no finally
|
||||
try { }
|
||||
catch (A $b) { }
|
||||
|
||||
// no catch
|
||||
try { }
|
||||
finally { }
|
||||
|
||||
-----
|
||||
array(
|
||||
0: Stmt_TryCatch(
|
||||
stmts: array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_FuncCall(
|
||||
name: Name(
|
||||
parts: array(
|
||||
0: doTry
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
catches: array(
|
||||
0: Stmt_Catch(
|
||||
types: array(
|
||||
0: Name(
|
||||
parts: array(
|
||||
0: A
|
||||
)
|
||||
)
|
||||
)
|
||||
var: Expr_Variable(
|
||||
name: b
|
||||
)
|
||||
stmts: array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_FuncCall(
|
||||
name: Name(
|
||||
parts: array(
|
||||
0: doCatchA
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_Catch(
|
||||
types: array(
|
||||
0: Name(
|
||||
parts: array(
|
||||
0: B
|
||||
)
|
||||
)
|
||||
)
|
||||
var: Expr_Variable(
|
||||
name: c
|
||||
)
|
||||
stmts: array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_FuncCall(
|
||||
name: Name(
|
||||
parts: array(
|
||||
0: doCatchB
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
finally: Stmt_Finally(
|
||||
stmts: array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_FuncCall(
|
||||
name: Name(
|
||||
parts: array(
|
||||
0: doFinally
|
||||
)
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_TryCatch(
|
||||
stmts: array(
|
||||
)
|
||||
catches: array(
|
||||
0: Stmt_Catch(
|
||||
types: array(
|
||||
0: Name(
|
||||
parts: array(
|
||||
0: A
|
||||
)
|
||||
)
|
||||
)
|
||||
var: Expr_Variable(
|
||||
name: b
|
||||
)
|
||||
stmts: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
finally: null
|
||||
comments: array(
|
||||
0: // no finally
|
||||
)
|
||||
)
|
||||
2: Stmt_TryCatch(
|
||||
stmts: array(
|
||||
)
|
||||
catches: array(
|
||||
)
|
||||
finally: Stmt_Finally(
|
||||
stmts: array(
|
||||
)
|
||||
)
|
||||
comments: array(
|
||||
0: // no catch
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue