@@ -180,6 +180,8 @@ public function testGetCapabilitiesGuest(): void {
180180 ],
181181 'conversations ' => [
182182 'can-create ' => false ,
183+ 'can-create-group ' => false ,
184+ 'can-create-public ' => false ,
183185 ],
184186 'previews ' => [
185187 'max-gif-size ' => 200000 ,
@@ -195,8 +197,8 @@ public function testGetCapabilitiesGuest(): void {
195197
196198 public function dataGetCapabilitiesUserAllowed (): array {
197199 return [
198- [true , false , Participant::PRIVACY_PRIVATE ],
199- [false , true , Participant::PRIVACY_PUBLIC ],
200+ [true , false , false , false , Participant::PRIVACY_PRIVATE ],
201+ [false , true , true , true , Participant::PRIVACY_PUBLIC ],
200202 ];
201203 }
202204
@@ -206,7 +208,13 @@ public function dataGetCapabilitiesUserAllowed(): array {
206208 * @param bool $canCreate
207209 * @param int $readPrivacy
208210 */
209- public function testGetCapabilitiesUserAllowed (bool $ isNotAllowed , bool $ canCreate , int $ readPrivacy ): void {
211+ public function testGetCapabilitiesUserAllowed (
212+ bool $ isNotAllowed ,
213+ bool $ canCreate ,
214+ bool $ canCreateGroup ,
215+ bool $ canCreatePublic ,
216+ int $ readPrivacy
217+ ): void {
210218 $ capabilities = new Capabilities (
211219 $ this ->serverConfig ,
212220 $ this ->talkConfig ,
@@ -242,6 +250,16 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
242250 ->with ($ user )
243251 ->willReturn ($ isNotAllowed );
244252
253+ $ this ->talkConfig ->expects ($ this ->once ())
254+ ->method ('isNotAllowedToCreateGroupConversations ' )
255+ ->with ($ user )
256+ ->willReturn ($ isNotAllowed );
257+
258+ $ this ->talkConfig ->expects ($ this ->once ())
259+ ->method ('isNotAllowedToCreatePublicConversations ' )
260+ ->with ($ user )
261+ ->willReturn ($ isNotAllowed );
262+
245263 $ this ->talkConfig ->expects ($ this ->once ())
246264 ->method ('getUserReadPrivacy ' )
247265 ->with ('uid ' )
@@ -282,6 +300,8 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
282300 ],
283301 'conversations ' => [
284302 'can-create ' => $ canCreate ,
303+ 'can-create-group ' => $ canCreateGroup ,
304+ 'can-create-public ' => $ canCreatePublic ,
285305 ],
286306 'previews ' => [
287307 'max-gif-size ' => 200000 ,
0 commit comments