X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fauth%2FAuthenticationRequestTestCase.php;h=b5c8a36cd1d7406e220f3f1f94874be58088f363;hb=d4df96ad746e6021d2a9a114543e6502475c0fb2;hp=aafcd09d6f15d451a14a1a9ec72ea3f7e6dba082;hpb=1f8f0e3cf745a000d7d92aa1f253bbc21e7b305c;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/auth/AuthenticationRequestTestCase.php b/tests/phpunit/includes/auth/AuthenticationRequestTestCase.php index aafcd09d6f..b5c8a36cd1 100644 --- a/tests/phpunit/includes/auth/AuthenticationRequestTestCase.php +++ b/tests/phpunit/includes/auth/AuthenticationRequestTestCase.php @@ -6,15 +6,6 @@ namespace MediaWiki\Auth; * @group AuthManager */ abstract class AuthenticationRequestTestCase extends \MediaWikiTestCase { - protected function setUp() { - global $wgDisableAuthManager; - - parent::setUp(); - if ( $wgDisableAuthManager ) { - $this->markTestSkipped( '$wgDisableAuthManager is set' ); - } - } - abstract protected function getInstance( array $args = [] ); /** @@ -41,6 +32,13 @@ abstract class AuthenticationRequestTestCase extends \MediaWikiTestCase { if ( isset( $data['image'] ) ) { $this->assertType( 'string', $data['image'], "Field $field, image" ); } + if ( isset( $data['sensitive'] ) ) { + $this->assertType( 'bool', $data['sensitive'], "Field $field, sensitive" ); + } + if ( $data['type'] === 'password' ) { + $this->assertTrue( !empty( $data['sensitive'] ), + "Field $field, password field must be sensitive" ); + } switch ( $data['type'] ) { case 'string':