1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
<?php
namespace MediaWiki\Tests\User\TempUser;
use MediaWiki\User\TempUser\PlainNumericSerialMapping;
use PHPUnit\Framework\TestCase;
/**
* @covers \MediaWiki\User\TempUser\PlainNumericSerialMapping
*/
class PlainNumericSerialMappingTest extends TestCase {
public function testGetSerialIdForIndex() {
$map = new PlainNumericSerialMapping( [] );
$this->assertSame( '111', $map->getSerialIdForIndex( 111 ) );
}
public function testGetSerialIdForIndexWithOffset() {
$map = new PlainNumericSerialMapping( [ 'offset' => 111 ] );
$this->assertSame( '222', $map->getSerialIdForIndex( 111 ) );
}
}
|