Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / nikic / php-parser / test / code / formatPreservation / inlineHtml.test
diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/inlineHtml.test b/vendor/nikic/php-parser/test/code/formatPreservation/inlineHtml.test
new file mode 100644 (file)
index 0000000..7494e53
--- /dev/null
@@ -0,0 +1,54 @@
+Handling of inline HTML
+-----
+<?php
+
+function test() {
+    ?>Foo<?php
+}
+-----
+$stmts[0]->setAttribute('origNode', null);
+-----
+<?php
+
+function test()
+{
+    ?>Foo<?php
+}
+-----
+<?php
+
+function test() {
+    foo();
+    ?>Bar<?php
+    baz();
+}
+-----
+// TODO Fix broken result
+$stmts[0]->stmts[2] = $stmts[0]->stmts[1];
+-----
+<?php
+
+function test() {
+    foo();
+    ?>Bar<?php
+    Bar
+}
+-----
+<?php
+
+function test() {
+    foo();
+    ?>Bar<?php
+    baz();
+}
+-----
+// TODO Fix broken result
+$stmts[0]->stmts[1] = $stmts[0]->stmts[2];
+-----
+<?php
+
+function test() {
+    foo();<?php
+    baz();
+    baz();
+}
\ No newline at end of file