Skip to content

Commit 0406f74

Browse files
committed
Added tests.
1 parent 1545b79 commit 0406f74

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CPMDBTests\TestSuites\Collection;
6+
7+
use CPMDB\Mods\Mod\ModID;
8+
use CPMDBTEsts\TestClasses\CPMDBTestCase;
9+
10+
final class ModIDTests extends CPMDBTestCase
11+
{
12+
public function test_list2UUIDStrings(): void
13+
{
14+
$ids = array(
15+
'clothing.catsuit',
16+
'catsuit',
17+
'clothing.biker-boots',
18+
ModID::create('biker-boots')
19+
);
20+
21+
$this->assertSame(
22+
array(
23+
'clothing.biker-boots',
24+
'clothing.catsuit'
25+
),
26+
ModID::list2UUIDStrings($ids)
27+
);
28+
}
29+
30+
public function test_list2UUIDs() : void
31+
{
32+
$ids = array(
33+
'clothing.catsuit',
34+
'catsuit',
35+
'clothing.biker-boots',
36+
ModID::create('biker-boots')
37+
);
38+
39+
$result = ModID::list2UUIDs($ids);
40+
41+
$this->assertCount(2, $result);
42+
$this->assertSame('clothing.biker-boots', $result[0]->getModUUID());
43+
$this->assertSame('clothing.catsuit', $result[1]->getModUUID());
44+
}
45+
}

0 commit comments

Comments
 (0)