return call_user_func_array( array( $this, 'onConsecutiveCalls' ), $retvals );
}
-
protected function genSelectResult( $batchSize, $numRows, $rowGenerator ) {
$res = array();
for ( $i = 0; $i < $numRows; $i += $batchSize ) {
protected function mockDb() {
// Cant mock from DatabaseType or DatabaseBase, they dont
// have the full gamut of methods
+ // FIXME: the constructor normally sets mAtomicLevels and mSrvCache
$databaseMysql = $this->getMockBuilder( 'DatabaseMysql' )
->disableOriginalConstructor()
->getMock();
$databaseMysql->expects( $this->any() )
->method( 'isOpen' )
->will( $this->returnValue( true ) );
+ $databaseMysql->expects( $this->any() )
+ ->method( 'getApproximateLagStatus' )
+ ->will( $this->returnValue( array( 'lag' => 0, 'since' => 0 ) ) );
return $databaseMysql;
}
}