Skip to content

Commit

Permalink
Update ChecksumBarcodeTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
casperbakker committed Sep 20, 2024
1 parent f2abc13 commit 871daeb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/ChecksumBarcodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testAllValidBarcodeTypes()
$barcodeType = $this->getBarcodeType($barcodeTestSet['type']);

foreach ($barcodeTestSet['barcodes'] as $testBarcode => $validBarcode) {
$this->assertEquals($validBarcode, $barcodeType->getBarcodeData($testBarcode)->getBarcode());
$this->assertEquals($validBarcode, $barcodeType->getBarcode($testBarcode)->getBarcode());
}
}
}
Expand All @@ -42,7 +42,7 @@ public function testAllInvalidBarcodeTypes()

foreach ($barcodeTestSet['barcodes'] as $invalidBarcode) {
try {
$barcodeType->getBarcodeData($invalidBarcode)->getBarcode();
$barcodeType->getBarcode($invalidBarcode)->getBarcode();
} catch (BarcodeException $exception) {
$this->assertInstanceOf(InvalidCheckDigitException::class, $exception);
continue;
Expand All @@ -53,7 +53,6 @@ public function testAllInvalidBarcodeTypes()
}
}


private function getBarcodeType(string $typeClass): TypeInterface
{
return new $typeClass;
Expand Down

0 comments on commit 871daeb

Please sign in to comment.