Skip to content

Commit

Permalink
add bic validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
smhg committed Sep 23, 2023
1 parent 982bb33 commit ecaf2d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ public function testSetCharacterSet(): void
$sepaQrData->setCharacterSet('UTF8'); // @phpstan-ignore-line
}

public function testSetBic(): void
{
$sepaQrData = new Data();

$sepaQrData->setBic('ABCDEFGH'); // 8 characters
$sepaQrData->setBic('ABCDEFGHIJK'); // 11 characters

$this->expectException(Exception::class);

$sepaQrData->setBic('ABCDEFGHI'); // 9 characters
}

public function testSetCurrency(): void
{
$sepaQrData = new Data();
Expand Down

0 comments on commit ecaf2d5

Please sign in to comment.