wiki.techinc.nl/tests/phpunit/unit/includes/user/TempUser/PlainNumericSerialMappingTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
608 B
PHP
Raw Normal View History

<?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 ) );
}
}