diff --git a/tests/php/Security/RememberLoginHashTest.php b/tests/php/Security/RememberLoginHashTest.php index d8f7c5ac6e7..47504b78754 100644 --- a/tests/php/Security/RememberLoginHashTest.php +++ b/tests/php/Security/RememberLoginHashTest.php @@ -97,47 +97,4 @@ public function testGetSetLogoutAcrossDevices() RememberLoginHash::setLogoutAcrossDevices(false); $this->assertFalse(RememberLoginHash::getLogoutAcrossDevices()); } - - /** - * @param bool $replaceToken - */ - #[DataProvider('provideRenew')] - public function testRenew($replaceToken) - { - // If session-manager module is installed it expects an active request during renewal - if (class_exists(LoginSession::class)) { - $this->markTestSkipped(); - } - - $member = $this->objFromFixture(Member::class, 'main'); - - Deprecation::withSuppressedNotice( - fn() => RememberLoginHash::config()->set('replace_token_during_session_renewal', $replaceToken) - ); - - $hash = RememberLoginHash::generate($member); - $oldToken = $hash->getToken(); - $oldHash = $hash->Hash; - - // Fetch the token from the DB - otherwise we still have the token from when this was originally created - $storedHash = RememberLoginHash::get()->find('ID', $hash->ID); - - Deprecation::withSuppressedNotice(fn() => $storedHash->renew()); - - if ($replaceToken) { - $this->assertNotEquals($oldToken, $storedHash->getToken()); - $this->assertNotEquals($oldHash, $storedHash->Hash); - } else { - $this->assertEmpty($storedHash->getToken()); - $this->assertEquals($oldHash, $storedHash->Hash); - } - } - - public static function provideRenew(): array - { - return [ - [true], - [false], - ]; - } }