Skip to content

Commit

Permalink
chore: improve decoder test
Browse files Browse the repository at this point in the history
  • Loading branch information
petrknap committed Mar 31, 2024
1 parent 0daea75 commit 8d4f1d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/DecoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ public function testChecksumThrows(string $data, string $algorithm): void

public static function dataChecksumThrows(): array
{
$dataSet = self::dataChecksum()[CoderInterface::CHECKSUM_ALGORITHM];
return [
'wrong algorithm' => ['', '?'],
'wrong checksum' => ['?', CoderInterface::CHECKSUM_ALGORITHM],
'wrong algorithm' => [$dataSet[1], '?'],
'short data' => ['?', CoderInterface::CHECKSUM_ALGORITHM],
'wrong data' => [$dataSet[0], CoderInterface::CHECKSUM_ALGORITHM],
'wrong checksum' => ['?' . $dataSet[1], CoderInterface::CHECKSUM_ALGORITHM],
];
}

Expand Down

0 comments on commit 8d4f1d4

Please sign in to comment.