X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FMemoizedCallableTest.php;h=d64ba3d41f6d4c0d550088ac6654e72b033b906f;hp=d99c58781cc1f41583488ad22347903f31ac0d69;hb=8624538de243da3779db5eb3362bedf78d2e2931;hpb=d5a7166771613dfe4ed9fb75fa5efeced6134bd1 diff --git a/tests/phpunit/includes/libs/MemoizedCallableTest.php b/tests/phpunit/includes/libs/MemoizedCallableTest.php index d99c58781c..d64ba3d41f 100644 --- a/tests/phpunit/includes/libs/MemoizedCallableTest.php +++ b/tests/phpunit/includes/libs/MemoizedCallableTest.php @@ -24,14 +24,16 @@ class ArrayBackedMemoizedCallable extends MemoizedCallable { * PHP Unit tests for MemoizedCallable class. * @covers MemoizedCallable */ -class MemoizedCallableTest extends PHPUnit_Framework_TestCase { +class MemoizedCallableTest extends PHPUnit\Framework\TestCase { + + use MediaWikiCoversValidator; /** * The memoized callable should relate inputs to outputs in the same * way as the original underlying callable. */ public function testReturnValuePassedThrough() { - $mock = $this->getMockBuilder( 'stdClass' ) + $mock = $this->getMockBuilder( stdClass::class ) ->setMethods( [ 'reverse' ] )->getMock(); $mock->expects( $this->any() ) ->method( 'reverse' ) @@ -48,7 +50,7 @@ class MemoizedCallableTest extends PHPUnit_Framework_TestCase { * @requires function apc_store/apcu_store */ public function testCallableMemoized() { - $observer = $this->getMockBuilder( 'stdClass' ) + $observer = $this->getMockBuilder( stdClass::class ) ->setMethods( [ 'computeSomething' ] )->getMock(); $observer->expects( $this->once() ) ->method( 'computeSomething' )