Merge "Add SPARQL client to core"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / MemoizedCallableTest.php
index 881f5e1..d09171c 100644 (file)
@@ -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::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' ) );