Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / nikic / php-parser / test / code / formatPreservation / listInsertionIndentation.test
diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/listInsertionIndentation.test b/vendor/nikic/php-parser/test/code/formatPreservation/listInsertionIndentation.test
new file mode 100644 (file)
index 0000000..ffcc6cf
--- /dev/null
@@ -0,0 +1,17 @@
+Check correct indentation use when inserting into list node
+-----
+<?php
+$this->foo = new Foo;
+$this->foo->a()
+          ->b();
+-----
+$outerCall = $stmts[1]->expr;
+$innerCall = $outerCall->var;
+$var = $innerCall->var;
+$stmts[1]->expr = $innerCall;
+$stmts[2] = new Stmt\Expression(new Expr\MethodCall($var, $outerCall->name));
+-----
+<?php
+$this->foo = new Foo;
+$this->foo->a();
+$this->foo->b();
\ No newline at end of file