Skip to content

Commit

Permalink
Merge pull request #10 from tienvx/rename-variable
Browse files Browse the repository at this point in the history
test: Rename variables
  • Loading branch information
tienvx committed Apr 1, 2024
2 parents e8b0b23 + b0041a5 commit ca0dc99
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Application/Controller/UserControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public function testUpdateUser(): void
$collector = $container->get(EnvelopeCollectorInterface::class);
$this->assertCount(1, $all = $collector->getAll());

$this->assertInstanceOf(Envelope::class, $created = $collector->getSingle(UserUpdated::class));
$this->assertTrue(in_array($created, $all));
$this->assertInstanceOf(UserUpdated::class, $message = $created->getMessage());
$this->assertInstanceOf(Envelope::class, $updated = $collector->getSingle(UserUpdated::class));
$this->assertTrue(in_array($updated, $all));
$this->assertInstanceOf(UserUpdated::class, $message = $updated->getMessage());
$this->assertSame(123, $message->userId);
}

Expand All @@ -53,9 +53,9 @@ public function testDeleteUser(): void
$collector = $container->get(EnvelopeCollectorInterface::class);
$this->assertCount(1, $all = $collector->getAll());

$this->assertInstanceOf(Envelope::class, $created = $collector->getSingle(UserDeleted::class));
$this->assertTrue(in_array($created, $all));
$this->assertInstanceOf(UserDeleted::class, $message = $created->getMessage());
$this->assertInstanceOf(Envelope::class, $deleted = $collector->getSingle(UserDeleted::class));
$this->assertTrue(in_array($deleted, $all));
$this->assertInstanceOf(UserDeleted::class, $message = $deleted->getMessage());
$this->assertSame(123, $message->userId);
}
}

0 comments on commit ca0dc99

Please sign in to comment.