Skip to content

Commit

Permalink
test for string
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmastech committed Jul 20, 2024
1 parent 98201ef commit 77087d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Adapters/InMemory/InMemoryDecrementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ public function arrayOfEnumsAsStat_recordsStatsAsStrings(): void
$inMemoryClient = new InMemoryClientAdapter();

// When
$inMemoryClient->decrement([IntBackedEnum::TWO, StringBackedEnum::A, PlainUnitEnum::FIRST], value: 1994);
$inMemoryClient->decrement([IntBackedEnum::TWO, StringBackedEnum::A, PlainUnitEnum::FIRST, "hello"], value: 1994);

// Then
self::assertCount(
3,
4,
/** @var array<int, InMemoryCountRecord> $countStats */
$countStats = $inMemoryClient->getStats()->getCounts()
);
Expand All @@ -127,5 +127,7 @@ public function arrayOfEnumsAsStat_recordsStatsAsStrings(): void
self::assertEquals(-1994, $countStats[1]->count);
self::assertEquals("FIRST", $countStats[2]->stat);
self::assertEquals(-1994, $countStats[2]->count);
self::assertEquals("hello", $countStats[3]->stat);
self::assertEquals(-1994, $countStats[3]->count);
}
}

0 comments on commit 77087d0

Please sign in to comment.