<?php
-class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
+class UIDGeneratorTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
protected function tearDown() {
- // Bug: 44850
+ // T46850
UIDGenerator::unitTestTearDown();
parent::tearDown();
}
* Test that generated UIDs have the expected properties
*
* @dataProvider provider_testTimestampedUID
- * @covers UIDGenerator::newTimestampedUID128
* @covers UIDGenerator::newTimestampedUID88
+ * @covers UIDGenerator::getTimestampedID88
+ * @covers UIDGenerator::newTimestampedUID128
+ * @covers UIDGenerator::getTimestampedID128
*/
public function testTimestampedUID( $method, $digitlen, $bits, $tbits, $hostbits ) {
- $id = call_user_func( [ 'UIDGenerator', $method ] );
+ $id = call_user_func( [ UIDGenerator::class, $method ] );
$this->assertEquals( true, ctype_digit( $id ), "UID made of digit characters" );
$this->assertLessThanOrEqual( $digitlen, strlen( $id ),
"UID has the right number of digits" );
$ids = [];
for ( $i = 0; $i < 300; $i++ ) {
- $ids[] = call_user_func( [ 'UIDGenerator', $method ] );
+ $ids[] = call_user_func( [ UIDGenerator::class, $method ] );
}
$lastId = array_shift( $ids );
/**
* @covers UIDGenerator::newUUIDv1
+ * @covers UIDGenerator::getUUIDv1
*/
public function testUUIDv1() {
$ids = [];
/**
* @covers UIDGenerator::newSequentialPerNodeIDs
+ * @covers UIDGenerator::getSequentialPerNodeIDs
*/
public function testNewSequentialIDs() {
$ids = UIDGenerator::newSequentialPerNodeIDs( 'test', 32, 5 );