X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FMemoizedCallableTest.php;h=ba8af9352e15db3de08b8e44bfc1180aa7920c3e;hb=ea433039510bf7f57147cfd84b1b4e460e094433;hp=881f5e11679392fe9a6de992c2695bfe0fa594bf;hpb=e758226c91935a1df2b6fd3ed1f18922d8bfb45b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/MemoizedCallableTest.php b/tests/phpunit/includes/libs/MemoizedCallableTest.php index 881f5e1167..ba8af9352e 100644 --- a/tests/phpunit/includes/libs/MemoizedCallableTest.php +++ b/tests/phpunit/includes/libs/MemoizedCallableTest.php @@ -26,12 +26,15 @@ class ArrayBackedMemoizedCallable extends MemoizedCallable { */ 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' ) + ->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' ) + ->setMethods( [ 'computeSomething' ] )->getMock(); $observer->expects( $this->once() ) ->method( 'computeSomething' ) ->will( $this->returnValue( 'ok' ) );