diff options
Diffstat (limited to 'www/wiki/tests/phpunit/includes/auth/CreatedAccountAuthenticationRequestTest.php')
-rw-r--r-- | www/wiki/tests/phpunit/includes/auth/CreatedAccountAuthenticationRequestTest.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/www/wiki/tests/phpunit/includes/auth/CreatedAccountAuthenticationRequestTest.php b/www/wiki/tests/phpunit/includes/auth/CreatedAccountAuthenticationRequestTest.php new file mode 100644 index 00000000..fc1e6f15 --- /dev/null +++ b/www/wiki/tests/phpunit/includes/auth/CreatedAccountAuthenticationRequestTest.php @@ -0,0 +1,30 @@ +<?php + +namespace MediaWiki\Auth; + +/** + * @group AuthManager + * @covers MediaWiki\Auth\CreatedAccountAuthenticationRequest + */ +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 + ], + ]; + } +} |