X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FMemoizedCallableTest.php;h=ba8af9352e15db3de08b8e44bfc1180aa7920c3e;hb=827c6bfa416d9d0de8cc8e22f9f3fa36d8129d44;hp=6eb96b157e2a4c15b688d7304f903673af46bea7;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/MemoizedCallableTest.php b/tests/phpunit/includes/libs/MemoizedCallableTest.php index 6eb96b157e..ba8af9352e 100644 --- a/tests/phpunit/includes/libs/MemoizedCallableTest.php +++ b/tests/phpunit/includes/libs/MemoizedCallableTest.php @@ -1,7 +1,7 @@ getMock( 'stdClass', [ 'reverse' ] ); + $mock = $this->getMockBuilder( 'stdClass' ) + ->setMethods( [ 'reverse' ] )->getMock(); $mock->expects( $this->any() ) ->method( 'reverse' ) ->will( $this->returnCallback( 'strrev' ) ); @@ -44,10 +47,11 @@ class MemoizedCallableTest extends PHPUnit_Framework_TestCase { * Consecutive calls to the memoized callable with the same arguments * should result in just one invocation of the underlying callable. * - * @requires function apc_store + * @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' ) );