X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fstructure%2FPasswordPolicyStructureTest.php;h=60ce575e4c4559b039b553d281ae7f39f0ba7a0d;hb=aac6b26c0bafc81287bb042304f1d346da94dc89;hp=b263762513628a8920ec5318989a8c62c88ca2a6;hpb=52adf05e8f9574b6e16f12fec093fc8eb72f76cc;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/structure/PasswordPolicyStructureTest.php b/tests/phpunit/structure/PasswordPolicyStructureTest.php index b263762513..60ce575e4c 100644 --- a/tests/phpunit/structure/PasswordPolicyStructureTest.php +++ b/tests/phpunit/structure/PasswordPolicyStructureTest.php @@ -18,14 +18,17 @@ class PasswordPolicyStructureTest extends MediaWikiTestCase { // This won't actually find all flags, just the ones in use. Can't really be helped, // other than adding the core flags here. - $flags = [ 'forceChange' ]; + $flags = [ 'forceChange', 'suggestChangeOnLogin' ]; foreach ( $wgPasswordPolicy['policies'] as $group => $checks ) { foreach ( $checks as $check => $settings ) { if ( is_array( $settings ) ) { - $flags = array_merge( $flags, array_diff( $settings, [ 'value' ] ) ); + $flags = array_unique( + array_merge( $flags, array_diff( array_keys( $settings ), [ 'value' ] ) ) + ); } } } + foreach ( $flags as $flag ) { yield [ $flag ]; }