X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FMemoizedCallableTest.php;h=d99c58781cc1f41583488ad22347903f31ac0d69;hb=2e472aba9893196b50a159e5e943e3bd7f767b29;hp=881f5e11679392fe9a6de992c2695bfe0fa594bf;hpb=c971615fe100535b2c2bddd6668961ece8bc9b8d;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/MemoizedCallableTest.php b/tests/phpunit/includes/libs/MemoizedCallableTest.php index 881f5e1167..d99c58781c 100644 --- a/tests/phpunit/includes/libs/MemoizedCallableTest.php +++ b/tests/phpunit/includes/libs/MemoizedCallableTest.php @@ -31,7 +31,8 @@ class MemoizedCallableTest extends PHPUnit_Framework_TestCase { * 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 +48,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' ) );