Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Fix unit test #11314

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

GuySartorelli
Copy link
Member

Fixes https://github.com/silverstripe/recipe-core/actions/runs/10061752291/job/28027797761

  1. SilverStripe\Security\Tests\RememberLoginHashTest::testRenew with data set ComplexTableField Utility Links #1 (false)
    Failed asserting that a string is empty.

Test was introduced in #11299

As per comments, if we don't fetch the hash from the DB, we still have the token which was generated for this hash, so the empty assertion fails.

Issue

Comment on lines -113 to +115
RememberLoginHash::config()->set('replace_token_during_session_renewal', $replaceToken);
Deprecation::withNoReplacement(
fn() => RememberLoginHash::config()->set('replace_token_during_session_renewal', $replaceToken)
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That config is deprecated, so we need to wrap this to avoid deprecation warnings when we go hunting for stuff we need to update for the final minor release.

@GuySartorelli
Copy link
Member Author

phplinting failure is pre-existing and will be fixed by #11313

@emteknetnz emteknetnz merged commit db05a28 into silverstripe:5 Jul 29, 2024
15 of 16 checks passed
@emteknetnz emteknetnz deleted the pulls/5/fix-test branch July 29, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants