X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fnikic%2Fphp-parser%2Ftest%2Fcode%2FformatPreservation%2FlistInsertionIndentation.test;fp=vendor%2Fnikic%2Fphp-parser%2Ftest%2Fcode%2FformatPreservation%2FlistInsertionIndentation.test;h=ffcc6cfb5b912aa723ecc70f7b5ce1411dd8b497;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0000000000000000000000000000000000000000;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website 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 index 000000000..ffcc6cfb5 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/formatPreservation/listInsertionIndentation.test @@ -0,0 +1,17 @@ +Check correct indentation use when inserting into list node +----- +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)); +----- +foo = new Foo; +$this->foo->a(); +$this->foo->b(); \ No newline at end of file