Browse Source

PHP 8.1: add new_in_initializers to PHP 8.1 integration test

Dariusz Ruminski 3 years ago
parent
commit
7af7214aa0
1 changed files with 18 additions and 0 deletions
  1. 18 0
      tests/Fixtures/Integration/misc/PHP8_1.test

+ 18 - 0
tests/Fixtures/Integration/misc/PHP8_1.test

@@ -47,6 +47,15 @@ fsync($fp);
 // https://wiki.php.net/rfc/explicit_octal_notation
 0o16 === 14;
 
+// https://wiki.php.net/rfc/new_in_initializers
+class TestNewWithInitialiers
+{
+    public function __construct(
+        private Logger $logger = new NullLogger(),
+    ) {
+    }
+}
+
 --INPUT--
 <?php
 
@@ -85,3 +94,12 @@ FSYNC($fp);
 
 // https://wiki.php.net/rfc/explicit_octal_notation
 0O16 === 14;
+
+// https://wiki.php.net/rfc/new_in_initializers
+class TestNewWithInitialiers
+{
+    public function __construct(
+        private Logger $logger = new NullLogger,
+    ) {
+    }
+}