@@ -405,103 +405,10 @@ public function testValidateAuthAfterRequireAuth()
405
405
406
406
$ this ->assertTrue ($ mockClient ->validateAuth ());
407
407
408
- $ this ->assertEquals ('123 ' , $ mockClient ->getPersistentId ());
409
408
$ this ->assertEquals (['919191 ' ], $ mockClient ->getScopes ());
410
409
$ this ->assertEquals ('http://example.com/wherever ' , $ mockClient ->getRedirectUrl ());
411
410
}
412
411
413
- // getPersistentId tests
414
- public function testGetPersistentIdNoSession ()
415
- {
416
- $ personaClient = new Login (
417
- [
418
- 'userAgent ' => 'unittest ' ,
419
- 'persona_host ' => 'localhost ' ,
420
- 'cacheBackend ' => $ this ->cacheBackend ,
421
- ]
422
- );
423
- $ this ->assertFalse ($ personaClient ->getPersistentId ());
424
- }
425
-
426
- public function testGetPersistentIdNoGupidInSession ()
427
- {
428
- $ personaClient = new Login (
429
- [
430
- 'userAgent ' => 'unittest ' ,
431
- 'persona_host ' => 'localhost ' ,
432
- 'cacheBackend ' => $ this ->cacheBackend ,
433
- ]
434
- );
435
- $ _SESSION [Login::LOGIN_PREFIX . ':loginSSO ' ] = [];
436
- $ this ->assertFalse ($ personaClient ->getPersistentId ());
437
- }
438
-
439
- public function testGetPersistentIdNoLoginProviderInSession ()
440
- {
441
- $ personaClient = new Login (
442
- [
443
- 'userAgent ' => 'unittest ' ,
444
- 'persona_host ' => 'localhost ' ,
445
- 'cacheBackend ' => $ this ->cacheBackend ,
446
- ]
447
- );
448
- $ _SESSION [Login::LOGIN_PREFIX . ':loginSSO ' ] = [];
449
- $ this ->assertFalse ($ personaClient ->getPersistentId ());
450
- }
451
-
452
- public function testGetPersistentIdEmptyGupids ()
453
- {
454
- $ personaClient = new Login (
455
- [
456
- 'userAgent ' => 'unittest ' ,
457
- 'persona_host ' => 'localhost ' ,
458
- 'cacheBackend ' => $ this ->cacheBackend ,
459
- ]
460
- );
461
- $ _SESSION [Login::LOGIN_PREFIX . ':loginProvider ' ] = 'trapdoor ' ;
462
- $ _SESSION [Login::LOGIN_PREFIX . ':loginSSO ' ] = ['gupid ' => []];
463
-
464
- $ this ->assertFalse ($ personaClient ->getPersistentId ());
465
- }
466
-
467
- public function testGetPersistentIdNoMatchingGupid ()
468
- {
469
- $ personaClient = new Login (
470
- [
471
- 'userAgent ' => 'unittest ' ,
472
- 'persona_host ' => 'localhost ' ,
473
- 'cacheBackend ' => $ this ->cacheBackend ,
474
- ]
475
- );
476
- $ _SESSION [Login::LOGIN_PREFIX . ':loginProvider ' ] = 'trapdoor ' ;
477
- $ _SESSION [Login::LOGIN_PREFIX . ':loginSSO ' ] = [
478
- 'gupid ' => [
479
- 'google:123 ' ,
480
- 'twitter:456 '
481
- ]
482
- ];
483
- $ this ->assertFalse ($ personaClient ->getPersistentId ());
484
- }
485
-
486
- public function testGetPersistentIdFoundMatchingGupid ()
487
- {
488
- $ personaClient = new Login (
489
- [
490
- 'userAgent ' => 'unittest ' ,
491
- 'persona_host ' => 'localhost ' ,
492
- 'cacheBackend ' => $ this ->cacheBackend ,
493
- ]
494
- );
495
- $ _SESSION [Login::LOGIN_PREFIX . ':loginProvider ' ] = 'trapdoor ' ;
496
- $ _SESSION [Login::LOGIN_PREFIX . ':loginSSO ' ] = [
497
- 'gupid ' => [
498
- 'google:123 ' ,
499
- 'trapdoor:456 '
500
- ]
501
- ];
502
- $ this ->assertEquals ('456 ' , $ personaClient ->getPersistentId ());
503
- }
504
-
505
412
// getRedirectUrl tests
506
413
public function testGetRedirectUrlNoSession ()
507
414
{
0 commit comments