X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FMemoizedCallableTest.php;h=d64ba3d41f6d4c0d550088ac6654e72b033b906f;hb=63d96c15fde8d4d2842aa50c5ed2ce594aa0c674;hp=881f5e11679392fe9a6de992c2695bfe0fa594bf;hpb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/MemoizedCallableTest.php b/tests/phpunit/includes/libs/MemoizedCallableTest.php index 881f5e1167..d64ba3d41f 100644 --- a/tests/phpunit/includes/libs/MemoizedCallableTest.php +++ b/tests/phpunit/includes/libs/MemoizedCallableTest.php @@ -24,14 +24,17 @@ 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->getMock( 'stdClass', [ 'reverse' ] ); + $mock = $this->getMockBuilder( stdClass::class ) + ->setMethods( [ 'reverse' ] )->getMock(); $mock->expects( $this->any() ) ->method( 'reverse' ) ->will( $this->returnCallback( 'strrev' ) ); @@ -47,7 +50,8 @@ class MemoizedCallableTest extends PHPUnit_Framework_TestCase { * @requires function apc_store/apcu_store */ public function testCallableMemoized() { - $observer = $this->getMock( 'stdClass', [ 'computeSomething' ] ); + $observer = $this->getMockBuilder( stdClass::class ) + ->setMethods( [ 'computeSomething' ] )->getMock(); $observer->expects( $this->once() ) ->method( 'computeSomething' ) ->will( $this->returnValue( 'ok' ) );