Should MW Codesniffer also handle these as well? Change-Id: Ieb493bddd5f3674fb889b4a780d51b50d89c4f65
34 lines
587 B
PHP
34 lines
587 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Auth;
|
|
|
|
/**
|
|
* @group AuthManager
|
|
* @covers \MediaWiki\Auth\UsernameAuthenticationRequest
|
|
*/
|
|
class UsernameAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
|
|
|
protected function getInstance( array $args = [] ) {
|
|
return new UsernameAuthenticationRequest();
|
|
}
|
|
|
|
public function provideLoadFromSubmission() {
|
|
return [
|
|
'Empty request' => [
|
|
[],
|
|
[],
|
|
false
|
|
],
|
|
'Username' => [
|
|
[],
|
|
$data = [ 'username' => 'User' ],
|
|
$data,
|
|
],
|
|
'Username empty' => [
|
|
[],
|
|
[ 'username' => '' ],
|
|
false
|
|
],
|
|
];
|
|
}
|
|
}
|