Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / nikic / php-parser / test / code / formatPreservation / modifierChange.test
diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/modifierChange.test b/vendor/nikic/php-parser/test/code/formatPreservation/modifierChange.test
new file mode 100644 (file)
index 0000000..06dba62
--- /dev/null
@@ -0,0 +1,33 @@
+Modifier change
+-----
+<?php
+class Foo {}
+abstract class Bar {
+    const
+    FOO = 42;
+
+    var $foo
+    = 24;
+
+    public function
+    foo() {}
+}
+-----
+$stmts[0]->flags = Stmt\Class_::MODIFIER_ABSTRACT;
+$stmts[1]->flags = 0;
+$stmts[1]->stmts[0]->flags = Stmt\Class_::MODIFIER_PRIVATE;
+$stmts[1]->stmts[1]->flags = Stmt\Class_::MODIFIER_PROTECTED;
+$stmts[1]->stmts[2]->flags |= Stmt\Class_::MODIFIER_FINAL;
+-----
+<?php
+abstract class Foo {}
+class Bar {
+    private const
+    FOO = 42;
+
+    protected $foo
+    = 24;
+
+    public final function
+    foo() {}
+}
\ No newline at end of file