File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,8 @@ public function newGuid( EntityId $entityId ) {
3737 return $ entityId ->getSerialization () . StatementGuid::SEPARATOR . $ this ->baseGenerator ->newGuid ();
3838 }
3939
40+ public function newStatementId ( EntityId $ entityId ): StatementGuid {
41+ return new StatementGuid ( $ entityId , $ this ->baseGenerator ->newGuid () );
42+ }
43+
4044}
Original file line number Diff line number Diff line change @@ -27,6 +27,17 @@ public function testGetGuid( EntityId $id ) {
2727 $ this ->assertIsGuidForId ( $ guidGen ->newGuid ( $ id ), $ id );
2828 }
2929
30+ /**
31+ * @dataProvider entityIdProvider
32+ */
33+ public function testGetStatementId ( EntityId $ id ) {
34+ $ guidGen = new GuidGenerator ();
35+
36+ $ this ->assertIsGuidForId ( (string )$ guidGen ->newStatementId ( $ id ), $ id );
37+ $ this ->assertIsGuidForId ( (string )$ guidGen ->newStatementId ( $ id ), $ id );
38+ $ this ->assertIsGuidForId ( (string )$ guidGen ->newStatementId ( $ id ), $ id );
39+ }
40+
3041 public function entityIdProvider () {
3142 $ argLists = [];
3243
You can’t perform that action at this time.
0 commit comments