@@ -33,45 +33,6 @@ public function setUp(): void {
3333 );
3434 }
3535
36- public function testHandleBoardsOwnedByDeletedUser (): void {
37- $ personalBoard = new Board ();
38- $ personalBoard ->setId (1 );
39- $ personalBoard ->setOwner ($ this ->userId1 );
40- $ personalBoard ->setTeamId (null );
41-
42- $ orphanedTeamBoard = new Board ();
43- $ orphanedTeamBoard ->setId (2 );
44- $ orphanedTeamBoard ->setOwner ($ this ->userId1 );
45- $ orphanedTeamBoard ->setTeamId ('team-a ' );
46-
47- $ transferableBoard = new Board ();
48- $ transferableBoard ->setId (3 );
49- $ transferableBoard ->setOwner ($ this ->userId1 );
50- $ transferableBoard ->setTeamId ('team-b ' );
51-
52- $ this ->boardMapper ->expects ($ this ->once ())
53- ->method ('findAllByOwner ' )
54- ->with ($ this ->userId1 )
55- ->willReturn ([$ personalBoard , $ orphanedTeamBoard , $ transferableBoard ]);
56-
57- $ this ->circlesService ->expects ($ this ->exactly (2 ))
58- ->method ('findNextMemberUserId ' )
59- ->willReturnMap ([
60- ['team-a ' , $ this ->userId1 , null ],
61- ['team-b ' , $ this ->userId1 , $ this ->userId2 ],
62- ]);
63-
64- $ this ->boardMapper ->expects ($ this ->once ())
65- ->method ('transferOwnership ' )
66- ->with ($ this ->userId1 , $ this ->userId2 , 3 );
67-
68- $ this ->boardMapper ->expects ($ this ->exactly (2 ))
69- ->method ('delete ' )
70- ->withConsecutive ([$ personalBoard ], [$ orphanedTeamBoard ]);
71-
72- $ this ->service ->handleBoardsOwnedByDeletedUser ($ this ->userId1 );
73- }
74-
7536 public function testHandleMemberLeftTeamTransfersOwnership (): void {
7637 $ board = new Board ();
7738 $ board ->setId (10 );
0 commit comments