$db = $this->mockDb();
$db->expects( $this->once() )
->method( 'select' )
- // only testing second parameter of DatabaseBase::select
+ // only testing second parameter of Database::select
->with( 'some_table', $columns )
->will( $this->returnValue( new ArrayIterator( [] ) ) );
/**
* Slightly hackish to use reflection, but asserting different parameters
- * to consecutive calls of DatabaseBase::select in phpunit is error prone
+ * to consecutive calls of Database::select in phpunit is error prone
*
* @dataProvider provider_readerSelectConditions
*/
protected function consecutivelyReturnFromSelect( array $results ) {
$retvals = [];
foreach ( $results as $rows ) {
- // The DatabaseBase::select method returns iterators, so we do too.
+ // The Database::select method returns iterators, so we do too.
$retvals[] = $this->returnValue( new ArrayIterator( $rows ) );
}
}
protected function mockDb() {
- // Cant mock from DatabaseType or DatabaseBase, they dont
- // have the full gamut of methods
+ // @TODO: mock from Database
// FIXME: the constructor normally sets mAtomicLevels and mSrvCache
$databaseMysql = $this->getMockBuilder( 'DatabaseMysql' )
->disableOriginalConstructor()