Merge "Fix access to services in unit tests."

This commit is contained in:
jenkins-bot 2021-01-12 23:24:15 +00:00 committed by Gerrit Code Review
commit 655b3fbc04
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@
* @group ResourceLoader
* @covers DerivativeResourceLoaderContext
*/
class DerivativeResourceLoaderContextTest extends PHPUnit\Framework\TestCase {
class DerivativeResourceLoaderContextTest extends MediaWikiIntegrationTestCase {
use MediaWikiCoversValidator;

View file

@ -190,7 +190,7 @@ class GlobalIdGeneratorTest extends PHPUnit\Framework\TestCase {
* @param string $uuid
* @param string $ts
* @dataProvider provideGetTimestampFromUUIDv1
* @covers UIDGenerator::getTimestampFromUUIDv1
* @covers \Wikimedia\UUID\GlobalIdGenerator::getTimestampFromUUIDv1
*/
public function testGetTimestampFromUUIDv1( string $uuid, string $ts ) {
$this->assertEquals( $ts, $this->globalIdGenerator->getTimestampFromUUIDv1( $uuid ) );
@ -208,11 +208,11 @@ class GlobalIdGeneratorTest extends PHPUnit\Framework\TestCase {
/**
* @param string $uuid
* @dataProvider provideGetTimestampFromUUIDv1InvalidUUIDv1
* @covers UIDGenerator::getTimestampFromUUIDv1
* @covers \Wikimedia\UUID\GlobalIdGenerator::getTimestampFromUUIDv1
*/
public function testGetTimestampFromUUIDv1InvalidUUIDv1( string $uuid ) {
$this->expectException( InvalidArgumentException::class );
UIDGenerator::getTimestampFromUUIDv1( $uuid );
$this->globalIdGenerator->getTimestampFromUUIDv1( $uuid );
}
protected function setUp() : void {