Debian Codegraph @

tests/phpunit/unit/includes/user/TempUser/PlainNumericSerialMappingTest.php

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