From 7f26f919e3b0c413522a32c18ec96032f2b411a3 Mon Sep 17 00:00:00 2001
From: Hamad Rashid <80243282+Hamad-Rashid@users.noreply.github.com>
Date: Tue, 31 Dec 2024 19:36:29 +0500
Subject: [PATCH] Update ConstructorPromotionTest.php

the optional parameter $email is declared before a required parameter $birth_date, which is not allowed in PHP 8. In PHP, optional parameters must always come after the required parameters.
---
 tests/integration/PHP8/ConstructorPromotionTest.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/integration/PHP8/ConstructorPromotionTest.php b/tests/integration/PHP8/ConstructorPromotionTest.php
index d14b435a..c3a24601 100644
--- a/tests/integration/PHP8/ConstructorPromotionTest.php
+++ b/tests/integration/PHP8/ConstructorPromotionTest.php
@@ -51,15 +51,15 @@ public function testPropertiesAreCreated() : void
 
         $constructor = $this->expectedContructorMethod();
         $constructor->addArgument(new Argument('name', new String_()));
-        $constructor->addArgument(new Argument('email', new String_(), '\'test@example.com\''));
         $constructor->addArgument(new Argument('birth_date', new Object_(new Fqsen('\\' . \DateTimeImmutable::class))));
+        $constructor->addArgument(new Argument('email', new String_(), '\'test@example.com\''));
 
         self::assertEquals($constructor, $class->getMethods()['\PHP8\ConstructorPromotion::__construct()']);
         self::assertEquals(
             [
                 '\PHP8\ConstructorPromotion::$name' => $this->expectedNameProperty(),
-                '\PHP8\ConstructorPromotion::$email' => $this->expectedEmailProperty(),
-                '\PHP8\ConstructorPromotion::$birth_date' => $this->expectedBirthDateProperty()
+                '\PHP8\ConstructorPromotion::$birth_date' => $this->expectedBirthDateProperty(),
+                '\PHP8\ConstructorPromotion::$email' => $this->expectedEmailProperty()
             ],
             $class->getProperties()
         );