Skip to content

Commit 8d4f1d4

Browse files
committed
chore: improve decoder test
1 parent 0daea75 commit 8d4f1d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/DecoderTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ public function testChecksumThrows(string $data, string $algorithm): void
4949

5050
public static function dataChecksumThrows(): array
5151
{
52+
$dataSet = self::dataChecksum()[CoderInterface::CHECKSUM_ALGORITHM];
5253
return [
53-
'wrong algorithm' => ['', '?'],
54-
'wrong checksum' => ['?', CoderInterface::CHECKSUM_ALGORITHM],
54+
'wrong algorithm' => [$dataSet[1], '?'],
55+
'short data' => ['?', CoderInterface::CHECKSUM_ALGORITHM],
56+
'wrong data' => [$dataSet[0], CoderInterface::CHECKSUM_ALGORITHM],
57+
'wrong checksum' => ['?' . $dataSet[1], CoderInterface::CHECKSUM_ALGORITHM],
5558
];
5659
}
5760

0 commit comments

Comments
 (0)