Merge "Database: clean up lockTables() and add postgres support"
[lhc/web/wiklou.git] / tests / phpunit / includes / search / SearchEngineTest.php
index 3fb4bbb..c74c893 100644 (file)
@@ -164,7 +164,8 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                /**
                 * @var $mockEngine SearchEngine
                 */
-               $mockEngine = $this->getMock( 'SearchEngine', [ 'makeSearchFieldMapping' ] );
+               $mockEngine = $this->getMockBuilder( 'SearchEngine' )
+                       ->setMethods( [ 'makeSearchFieldMapping' ] )->getMock();
 
                $mockFieldBuilder = function ( $name, $type ) {
                        $mockField =
@@ -230,7 +231,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
        }
 
        public function addAugmentors( &$setAugmentors, &$rowAugmentors ) {
-               $setAugmentor = $this->getMock( 'ResultSetAugmentor' );
+               $setAugmentor = $this->createMock( 'ResultSetAugmentor' );
                $setAugmentor->expects( $this->once() )
                        ->method( 'augmentAll' )
                        ->willReturnCallback( function ( SearchResultSet $resultSet ) {
@@ -244,7 +245,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        } );
                $setAugmentors['testSet'] = $setAugmentor;
 
-               $rowAugmentor = $this->getMock( 'ResultAugmentor' );
+               $rowAugmentor = $this->createMock( 'ResultAugmentor' );
                $rowAugmentor->expects( $this->exactly( 2 ) )
                        ->method( 'augment' )
                        ->willReturnCallback( function ( SearchResult $result ) {