Skip to content

Commit 788ec41

Browse files
committed
Add test for LpaUid
1 parent 15dc438 commit 788ec41

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AppTest\Entity\Value;
6+
7+
use App\Entity\Value\LpaUid;
8+
use App\Enum\LpaSource;
9+
use PHPUnit\Framework\Attributes\DataProvider;
10+
use PHPUnit\Framework\Attributes\Test;
11+
use PHPUnit\Framework\TestCase;
12+
13+
class LpaUidTest extends TestCase
14+
{
15+
#[Test]
16+
#[DataProvider('lpaData')]
17+
public function it_correctly_identifies_the_lpa_type(string $uid, LpaSource $source): void
18+
{
19+
$sut = new LpaUid($uid);
20+
21+
$this->assertEquals($source, $sut->getLpaSource());
22+
}
23+
24+
public static function lpaData(): array
25+
{
26+
return [
27+
'sirius type' => ['700000000047', LpaSource::SIRIUS],
28+
'lpa store type' => ['M-789Q-P4DF-4UX3', LpaSource::LPASTORE],
29+
];
30+
}
31+
}

0 commit comments

Comments
 (0)