2015-11-22 20:17:00 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Auth;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @group AuthManager
|
2018-11-01 11:48:52 +00:00
|
|
|
* @covers \MediaWiki\Auth\CreatedAccountAuthenticationRequest
|
2015-11-22 20:17:00 +00:00
|
|
|
*/
|
|
|
|
|
class CreatedAccountAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
|
|
|
|
|
|
|
|
|
protected function getInstance( array $args = [] ) {
|
|
|
|
|
return new CreatedAccountAuthenticationRequest( 42, 'Test' );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testConstructor() {
|
|
|
|
|
$ret = new CreatedAccountAuthenticationRequest( 42, 'Test' );
|
|
|
|
|
$this->assertSame( 42, $ret->id );
|
|
|
|
|
$this->assertSame( 'Test', $ret->username );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function provideLoadFromSubmission() {
|
|
|
|
|
return [
|
|
|
|
|
'Empty request' => [
|
|
|
|
|
[],
|
|
|
|
|
[],
|
|
|
|
|
false
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|