aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2023-06-19 21:21:47 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2023-06-19 20:21:08 +0000
commit580439e604e442a0dbb6532f53a366a7f848239d (patch)
tree7f48a7051a5da00bf31f468f6af4f7e23786bb13 /tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php
parent179f4f54978337e9348ee6eb5f323c3d0992cbb8 (diff)
downloadmediawikicore-580439e604e442a0dbb6532f53a366a7f848239d.tar.gz
mediawikicore-580439e604e442a0dbb6532f53a366a7f848239d.zip
tests: Use MainConfigNames consts to refer config names
PasswordSalt was dropped in 2e909bcb Change-Id: I58d2b8d4e2a235afdc8054eafdea4e85b61f03c1
Diffstat (limited to 'tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php')
-rw-r--r--tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php
index b2c4ffe2a44a..9a93b9ec1413 100644
--- a/tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php
+++ b/tests/phpunit/includes/auth/AbstractPasswordPrimaryAuthenticationProviderTest.php
@@ -63,10 +63,10 @@ class AbstractPasswordPrimaryAuthenticationProviderTest extends \MediaWikiIntegr
$this->initProvider( $provider, new MultiConfig( [ $config, $this->getServiceContainer()->getMainConfig() ] ) );
$providerPriv = TestingAccessWrapper::newFromObject( $provider );
- $config->set( 'PasswordExpirationDays', 0 );
+ $config->set( MainConfigNames::PasswordExpirationDays, 0 );
$this->assertNull( $providerPriv->getNewPasswordExpiry( 'UTSysop' ) );
- $config->set( 'PasswordExpirationDays', 5 );
+ $config->set( MainConfigNames::PasswordExpirationDays, 5 );
$this->assertEqualsWithDelta(
time() + 5 * 86400,
wfTimestamp( TS_UNIX, $providerPriv->getNewPasswordExpiry( 'UTSysop' ) ),
@@ -122,7 +122,7 @@ class AbstractPasswordPrimaryAuthenticationProviderTest extends \MediaWikiIntegr
public function testSetPasswordResetFlag() {
$config = new \HashConfig( [
- 'InvalidPasswordReset' => true,
+ MainConfigNames::InvalidPasswordReset => true,
] );
$services = $this->getServiceContainer();
@@ -164,7 +164,7 @@ class AbstractPasswordPrimaryAuthenticationProviderTest extends \MediaWikiIntegr
$this->assertSame( 'resetpass-validity-soft', $ret->msg->getKey() );
$this->assertFalse( $ret->hard );
- $config->set( 'InvalidPasswordReset', false );
+ $config->set( MainConfigNames::InvalidPasswordReset, false );
$manager->removeAuthenticationSessionData( null );
$providerPriv->setPasswordResetFlag( 'Foo', $status );
$ret = $manager->getAuthenticationSessionData( 'reset-pass' );