Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lealefoulon committed Jan 23, 2025
1 parent cd00683 commit e100486
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testCreate(): void
->willReturn('9ddd73e5-2162-4279-be73-183816e7f85b');

$this->authenticatedUser
->expects(self::once())
->expects(self::exactly(2))
->method('getUser')
->willReturn($user);

Expand All @@ -64,8 +64,6 @@ public function testCreate(): void
->method('getUuid')
->willReturn('3cc78eae-50ba-4805-9b75-7f64ca638caf');

$createdRegulationOrderHistory = $this->createMock(RegulationOrderHistory::class);

$this->regulationOrderHistoryRepository
->expects(self::once())
->method('add')
Expand All @@ -79,8 +77,7 @@ public function testCreate(): void
date: $now,
),
),
)
->willReturn($createdRegulationOrderHistory);
);

$handler = new CreateRegulationOrderHistoryCommandHandler(
$this->idFactory,
Expand All @@ -92,7 +89,5 @@ public function testCreate(): void
$command = new CreateRegulationOrderHistoryCommand($regulationOrder, $action);

$result = $handler($command);

$this->assertSame($createdRegulationOrderHistory, $result);
}
}

0 comments on commit e100486

Please sign in to comment.