Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/integration/PHP8/ConstructorPromotionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
Expand Down
Loading