Skip to content

Commit

Permalink
PLATFORM-9061| fix tests that use MediaWikiIntegrationTestCase::getDB()
Browse files Browse the repository at this point in the history
getDB() didn't make it into REL1_39 despite being marked as such
for now let's use protected member and upgrade when we switch to
the next version
  • Loading branch information
harnash authored and mszabo-wikia committed Feb 14, 2024
1 parent 90824f6 commit dbc2826
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/phpunit/integration/CargoBacklinksIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ private function storeTestData( $pageName, string $testFieldValue ): void {
* @param int $timestamp The UNIX touched timestamp to set.
*/
private function resetTouchedTimestamp( $titles, int $timestamp ): void {
$dbw = $this->getDb();

$dbw->update(
$this->db->update(
'page',
// SET
[ 'page_touched' => wfTimestamp( TS_MW, $timestamp ) ],
Expand All @@ -99,9 +97,7 @@ private function resetTouchedTimestamp( $titles, int $timestamp ): void {
* @return int[]
*/
private function getCargoBacklinks( int $queryPageId ): array {
$dbr = $this->getDb();

return $dbr->selectFieldValues(
return $this->db->selectFieldValues(
'cargo_backlinks',
'cbl_result_page_id',
[ 'cbl_query_page_id' => $queryPageId ],
Expand Down

0 comments on commit dbc2826

Please sign in to comment.