@@ -47,6 +47,7 @@ public function testCheckCredentialsSynchronizesGroupsForExistingUserWhenEnabled
4747 'keycloak.groupSyncOnLogin ' => 'true ' ,
4848 'keycloak.groupMapping ' => '{"manage-users":"Administrators","faq-editors":"faq-editors"} ' ,
4949 'keycloak.clientId ' => 'phpmyfaq ' ,
50+ 'security.permLevel ' => 'medium ' ,
5051 default => null ,
5152 });
5253 $ configuration ->method ('getLogger ' )->willReturn ($ this ->createMock (Logger::class));
@@ -125,7 +126,8 @@ public function testCheckCredentialsAutoProvisionsUserWhenEnabled(): void
125126 'display_name ' => 'John Doe ' ,
126127 'email ' => 'john@example.com ' ,
127128 'keycloak_sub ' => 'subject-123 ' ,
128- ]);
129+ ])
130+ ->willReturn (true );
129131
130132 $ auth = new AuthKeycloak (
131133 $ configuration ,
@@ -169,7 +171,8 @@ public function testCreateAssignsMappedGroupsFromKeycloakRoles(): void
169171 'display_name ' => 'John Doe ' ,
170172 'email ' => 'john@example.com ' ,
171173 'keycloak_sub ' => 'subject-123 ' ,
172- ]);
174+ ])
175+ ->willReturn (true );
173176 $ user ->expects ($ this ->once ())->method ('getUserId ' )->willReturn (42 );
174177
175178 $ permission = $ this ->createMock (MediumPermission::class);
@@ -230,7 +233,7 @@ public function testCreateSynchronizesMappedGroupsWhenEnabled(): void
230233 $ user ->expects ($ this ->once ())->method ('createUser ' )->with ('john ' , '' , '' )->willReturn (true );
231234 $ user ->expects ($ this ->once ())->method ('setStatus ' )->with ('active ' );
232235 $ user ->expects ($ this ->once ())->method ('setAuthSource ' )->with (AuthenticationSourceType::AUTH_KEYCLOAK ->value );
233- $ user ->expects ($ this ->once ())->method ('setUserData ' );
236+ $ user ->expects ($ this ->once ())->method ('setUserData ' )-> willReturn ( true ) ;
234237 $ user ->expects ($ this ->once ())->method ('getUserId ' )->willReturn (42 );
235238
236239 $ permission = $ this ->createMock (MediumPermission::class);
0 commit comments