X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fuser%2FExternalUserNamesTest.php;h=429bda46259ac68bebe167630e071a2fe3b26db8;hb=b8c5ec5999af9a79e090a5052b949f7c3ac9c471;hp=cf395f24270d0d65f536b0371a9af71dfef6b0d9;hpb=5612400c8271ac2762fd2ce9acfcc9a58e47f0ee;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/user/ExternalUserNamesTest.php b/tests/phpunit/includes/user/ExternalUserNamesTest.php index cf395f2427..429bda4625 100644 --- a/tests/phpunit/includes/user/ExternalUserNamesTest.php +++ b/tests/phpunit/includes/user/ExternalUserNamesTest.php @@ -108,4 +108,24 @@ class ExternalUserNamesTest extends MediaWikiTestCase { ); } + public function provideGetLocal() { + return [ + [ 'User1', 'User1' ], + [ '>User2', 'User2' ], + [ 'prefix>User3', 'User3' ], + [ 'prefix:>User4', 'User4' ], + ]; + } + + /** + * @covers ExternalUserNames::getLocal + * @dataProvider provideGetLocal + */ + public function testGetLocal( $username, $expected ) { + $this->assertSame( + $expected, + ExternalUserNames::getLocal( $username ) + ); + } + }