/**
* @var $mockEngine SearchEngine
*/
- $mockEngine = $this->getMock( 'SearchEngine', [ 'makeSearchFieldMapping' ] );
+ $mockEngine = $this->getMockBuilder( 'SearchEngine' )
+ ->setMethods( [ 'makeSearchFieldMapping' ] )->getMock();
$mockFieldBuilder = function ( $name, $type ) {
$mockField =
}
public function addAugmentors( &$setAugmentors, &$rowAugmentors ) {
- $setAugmentor = $this->getMock( 'ResultSetAugmentor' );
+ $setAugmentor = $this->createMock( 'ResultSetAugmentor' );
$setAugmentor->expects( $this->once() )
->method( 'augmentAll' )
->willReturnCallback( function ( SearchResultSet $resultSet ) {
} );
$setAugmentors['testSet'] = $setAugmentor;
- $rowAugmentor = $this->getMock( 'ResultAugmentor' );
+ $rowAugmentor = $this->createMock( 'ResultAugmentor' );
$rowAugmentor->expects( $this->exactly( 2 ) )
->method( 'augment' )
->willReturnCallback( function ( SearchResult $result ) {