wiki.techinc.nl/tests/phpunit/integration/includes/user/TempUser/LocalizedNumericSerialMappingTest.php
Tim Starling e8dbf5f80c TempUser infrastructure and services
Add services and utilities for automatic creation of temporary user
accounts on page save, in order to avoid exposing the user's IP
address.

* Add $wgAutoCreateTempUser, for configuring the system
* Add TempUserConfig service, which interprets the config.
* Add TempUserCreator service, which creates users during page save as
  requested by EditPage. With proxy methods to TempUserConfig for
  convenience.
* Add table user_autocreate_serial. Table creation is necessary before
  the feature is enabled but is not necessary before deployment of this
  commit.

Bug: T300263
Change-Id: Ib14a352490fc42039106523118e8d021844e3dfb
2022-04-14 09:23:55 +10:00

19 lines
540 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace MediaWiki\Tests\User\TempUser;
use MediaWiki\User\TempUser\LocalizedNumericSerialMapping;
use MediaWikiIntegrationTestCase;
/**
* @covers \MediaWiki\User\TempUser\LocalizedNumericSerialMapping
*/
class LocalizedNumericSerialMappingTest extends MediaWikiIntegrationTestCase {
public function testGetSerialIdForIndex() {
$map = new LocalizedNumericSerialMapping(
[ 'language' => 'ar' ],
$this->getServiceContainer()->getLanguageFactory()
);
$this->assertSame( '١٠', $map->getSerialIdForIndex( 10 ) );
}
}