Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / nikic / php-parser / test / code / formatPreservation / blockConversion.test
diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/blockConversion.test b/vendor/nikic/php-parser/test/code/formatPreservation/blockConversion.test
new file mode 100644 (file)
index 0000000..4c3c1e3
--- /dev/null
@@ -0,0 +1,29 @@
+It may be necessary to convert a single statement into a block
+-----
+<?php
+
+if
+($a) $b;
+-----
+// TODO Avoid fallback
+$stmts[0]->stmts[] = new Stmt\Expression(new Expr\Variable('c'));
+-----
+<?php
+
+if ($a) {
+    $b;
+    $c;
+}
+-----
+<?php
+
+if
+($a) {$b;}
+-----
+$stmts[0]->stmts[] = new Stmt\Expression(new Expr\Variable('c'));
+-----
+<?php
+
+if
+($a) {$b;
+$c;}
\ No newline at end of file