@@ -272,7 +272,7 @@ public function testDestroyWipePendingEmitsCancelledSubject(): void {
272272 $ this ->assertEquals ([], $ this ->controller ->destroy ($ tokenId )->getData ());
273273 }
274274
275- public function testDestroyAllRevokesEveryTokenButTheCurrent (): void {
275+ public function testDestroyOthersRevokesEveryTokenButTheCurrent (): void {
276276 $ currentToken = $ this ->mockAuthToken (10 );
277277 $ otherToken = $ this ->mockAuthToken (11 );
278278 $ appPassword = $ this ->mockAuthToken (12 );
@@ -297,13 +297,13 @@ public function testDestroyAllRevokesEveryTokenButTheCurrent(): void {
297297
298298 $ this ->mockActivityManager ();
299299
300- $ response = $ this ->controller ->destroyAll ();
300+ $ response = $ this ->controller ->destroyOthers ();
301301
302302 $ this ->assertSame ([11 , 12 ], $ revokedIds , 'the current session token must not be revoked ' );
303303 $ this ->assertSame (['revoked ' => [11 , 12 ]], $ response ->getData ());
304304 }
305305
306- public function testDestroyAllKeepsWipePendingTokens (): void {
306+ public function testDestroyOthersKeepsWipePendingTokens (): void {
307307 $ currentToken = $ this ->mockAuthToken (10 );
308308 $ otherToken = $ this ->mockAuthToken (11 );
309309 $ wipingToken = $ this ->mockAuthToken (12 , IToken::WIPE_TOKEN );
@@ -318,10 +318,10 @@ public function testDestroyAllKeepsWipePendingTokens(): void {
318318
319319 $ this ->mockActivityManager ();
320320
321- $ this ->assertSame (['revoked ' => [11 ]], $ this ->controller ->destroyAll ()->getData ());
321+ $ this ->assertSame (['revoked ' => [11 ]], $ this ->controller ->destroyOthers ()->getData ());
322322 }
323323
324- public function testDestroyAllPublishesOneAggregateActivity (): void {
324+ public function testDestroyOthersPublishesOneAggregateActivity (): void {
325325 $ currentToken = $ this ->mockAuthToken (10 );
326326
327327 $ this ->session ->method ('getId ' )->willReturn ('sessionid ' );
@@ -348,10 +348,10 @@ public function testDestroyAllPublishesOneAggregateActivity(): void {
348348 $ this ->activityManager ->expects ($ this ->once ())
349349 ->method ('publish ' );
350350
351- $ this ->controller ->destroyAll ();
351+ $ this ->controller ->destroyOthers ();
352352 }
353353
354- public function testDestroyAllWithNothingToRevokePublishesNoActivity (): void {
354+ public function testDestroyOthersWithNothingToRevokePublishesNoActivity (): void {
355355 $ currentToken = $ this ->mockAuthToken (10 );
356356
357357 $ this ->session ->method ('getId ' )->willReturn ('sessionid ' );
@@ -361,48 +361,48 @@ public function testDestroyAllWithNothingToRevokePublishesNoActivity(): void {
361361 $ this ->tokenProvider ->expects ($ this ->never ())->method ('invalidateTokenById ' );
362362 $ this ->activityManager ->expects ($ this ->never ())->method ('publish ' );
363363
364- $ this ->assertSame (['revoked ' => []], $ this ->controller ->destroyAll ()->getData ());
364+ $ this ->assertSame (['revoked ' => []], $ this ->controller ->destroyOthers ()->getData ());
365365 }
366366
367- public function testDestroyAllWithAppPassword (): void {
367+ public function testDestroyOthersWithAppPassword (): void {
368368 $ this ->session ->expects ($ this ->once ())
369369 ->method ('exists ' )
370370 ->with ('app_password ' )
371371 ->willReturn (true );
372372
373373 $ this ->tokenProvider ->expects ($ this ->never ())->method ('invalidateTokenById ' );
374374
375- $ response = $ this ->controller ->destroyAll ();
375+ $ response = $ this ->controller ->destroyOthers ();
376376 $ this ->assertSame (Http::STATUS_BAD_REQUEST , $ response ->getStatus ());
377377 }
378378
379- public function testDestroyAllWhileImpersonating (): void {
379+ public function testDestroyOthersWhileImpersonating (): void {
380380 $ this ->userSession ->method ('getImpersonatingUserID ' )->willReturn ('admin ' );
381381
382382 $ this ->tokenProvider ->expects ($ this ->never ())->method ('invalidateTokenById ' );
383383
384- $ response = $ this ->controller ->destroyAll ();
384+ $ response = $ this ->controller ->destroyOthers ();
385385 $ this ->assertSame (Http::STATUS_SERVICE_UNAVAILABLE , $ response ->getStatus ());
386386 }
387387
388- public function testDestroyAllSessionNotAvailable (): void {
388+ public function testDestroyOthersSessionNotAvailable (): void {
389389 $ this ->session ->method ('getId ' )
390390 ->willThrowException (new SessionNotAvailableException ());
391391
392392 $ this ->tokenProvider ->expects ($ this ->never ())->method ('invalidateTokenById ' );
393393
394- $ response = $ this ->controller ->destroyAll ();
394+ $ response = $ this ->controller ->destroyOthers ();
395395 $ this ->assertSame (Http::STATUS_SERVICE_UNAVAILABLE , $ response ->getStatus ());
396396 }
397397
398- public function testDestroyAllInvalidSessionToken (): void {
398+ public function testDestroyOthersInvalidSessionToken (): void {
399399 $ this ->session ->method ('getId ' )->willReturn ('sessionid ' );
400400 $ this ->tokenProvider ->method ('getToken ' )
401401 ->willThrowException (new InvalidTokenException ('Token does not exist ' ));
402402
403403 $ this ->tokenProvider ->expects ($ this ->never ())->method ('invalidateTokenById ' );
404404
405- $ response = $ this ->controller ->destroyAll ();
405+ $ response = $ this ->controller ->destroyOthers ();
406406 $ this ->assertSame (Http::STATUS_SERVICE_UNAVAILABLE , $ response ->getStatus ());
407407 }
408408
0 commit comments