File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
tests/CPMDBTests/TestSuites/Collection Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments