mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-27 04:24:43 +01:00
More PrettyPrinter tests
This commit is contained in:
parent
39a039fa42
commit
99e89743bd
9
test/code/prettyPrinter/continue.test
Normal file
9
test/code/prettyPrinter/continue.test
Normal file
@ -0,0 +1,9 @@
|
||||
continue
|
||||
-----
|
||||
<?php
|
||||
|
||||
continue;
|
||||
continue 2;
|
||||
-----
|
||||
continue;
|
||||
continue 2;
|
10
test/code/prettyPrinter/doWhile.test
Normal file
10
test/code/prettyPrinter/doWhile.test
Normal file
@ -0,0 +1,10 @@
|
||||
doWhile
|
||||
-----
|
||||
<?php
|
||||
|
||||
do {
|
||||
|
||||
} while (true);
|
||||
-----
|
||||
do {
|
||||
} while (true);
|
28
test/code/prettyPrinter/for.test
Normal file
28
test/code/prettyPrinter/for.test
Normal file
@ -0,0 +1,28 @@
|
||||
for
|
||||
-----
|
||||
<?php
|
||||
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
|
||||
}
|
||||
|
||||
for ($i = 0,$j = 0; $i < 10; $i++) {
|
||||
|
||||
}
|
||||
|
||||
for ($i = 0; $i < 10;) {
|
||||
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
|
||||
}
|
||||
-----
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
}
|
||||
for ($i = 0, $j = 0; $i < 10; $i++) {
|
||||
}
|
||||
for ($i = 0; $i < 10;) {
|
||||
}
|
||||
for (;;) {
|
||||
}
|
28
test/code/prettyPrinter/foreach.test
Normal file
28
test/code/prettyPrinter/foreach.test
Normal file
@ -0,0 +1,28 @@
|
||||
foreach
|
||||
-----
|
||||
<?php
|
||||
|
||||
foreach ($arr as $val) {
|
||||
|
||||
}
|
||||
|
||||
foreach ($arr as &$val) {
|
||||
|
||||
}
|
||||
|
||||
foreach ($arr as $key => $val) {
|
||||
|
||||
}
|
||||
|
||||
foreach ($arr as $key => &$val) {
|
||||
|
||||
}
|
||||
-----
|
||||
foreach ($arr as $val) {
|
||||
}
|
||||
foreach ($arr as &$val) {
|
||||
}
|
||||
foreach ($arr as $key => $val) {
|
||||
}
|
||||
foreach ($arr as $key => &$val) {
|
||||
}
|
7
test/code/prettyPrinter/goto.test
Normal file
7
test/code/prettyPrinter/goto.test
Normal file
@ -0,0 +1,7 @@
|
||||
goto
|
||||
-----
|
||||
<?php
|
||||
|
||||
goto marker;
|
||||
-----
|
||||
goto marker;
|
16
test/code/prettyPrinter/if.test
Normal file
16
test/code/prettyPrinter/if.test
Normal file
@ -0,0 +1,16 @@
|
||||
if/elseif/else
|
||||
-----
|
||||
<?php
|
||||
|
||||
if ($expr) {
|
||||
|
||||
} elseif ($expr2) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
-----
|
||||
if ($expr) {
|
||||
} elseif ($expr2) {
|
||||
} else {
|
||||
}
|
7
test/code/prettyPrinter/throw.test
Normal file
7
test/code/prettyPrinter/throw.test
Normal file
@ -0,0 +1,7 @@
|
||||
throw
|
||||
-----
|
||||
<?php
|
||||
|
||||
throw $e;
|
||||
-----
|
||||
throw $e;
|
24
test/code/prettyPrinter/tryCatch.test
Normal file
24
test/code/prettyPrinter/tryCatch.test
Normal file
@ -0,0 +1,24 @@
|
||||
tryCatch
|
||||
-----
|
||||
<?php
|
||||
|
||||
try {
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
} catch (Exception $e) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
-----
|
||||
try {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
try {
|
||||
} catch (Exception $e) {
|
||||
} finally {
|
||||
}
|
10
test/code/prettyPrinter/while.test
Normal file
10
test/code/prettyPrinter/while.test
Normal file
@ -0,0 +1,10 @@
|
||||
while
|
||||
-----
|
||||
<?php
|
||||
|
||||
while (true) {
|
||||
|
||||
}
|
||||
-----
|
||||
while (true) {
|
||||
}
|
Loading…
Reference in New Issue
Block a user