Skip to content

Commit

Permalink
finally
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <github@dartcafe.de>
  • Loading branch information
dartcafe committed Aug 31, 2023
1 parent e205fd9 commit 53948c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Integration/Command/Share/RemoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ public function testPollNotFound(): void {
public function testValid(array $input, array $pollData): void {
$initialShares = [];
$expectedShareCount = 0;
$expectedShareTokens = [];
$expectedShares = [];
foreach ($pollData['initialShares'] ?? [] as $type => $shares) {
foreach ($shares as $userId) {
$initialShares[] = $this->createShareMock($pollData['pollId'], $type, $userId);

if (in_array($userId, $pollData['expectedShares'][$type] ?? [])) {
$expectedShareTokens[] = $this->getShareToken($pollData['pollId'], $type, $userId);
$expectedShares[] = $userId;
$expectedShareCount++;
}
}
Expand All @@ -116,7 +116,7 @@ public function testValid(array $input, array $pollData): void {
$this->shareService
->expects($this->exactly($expectedShareCount))
->method('delete')
->with($this->logicalOr(...$initialShares));
->with($this->logicalOr(...$expectedShares));

$command = new Remove(
$this->pollMapper,
Expand Down

0 comments on commit 53948c9

Please sign in to comment.