Merge "When title contains only slashes, Title::getRootText() shouldn't return false"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiQueryWatchlistRawIntegrationTest.php
index 0f01664..c554fb3 100644 (file)
@@ -17,7 +17,6 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase {
                        = $this->getMutableTestUser();
                self::$users['ApiQueryWatchlistRawIntegrationTestUser2']
                        = $this->getMutableTestUser();
-               $this->doLogin( 'ApiQueryWatchlistRawIntegrationTestUser' );
        }
 
        private function getLoggedInTestUser() {
@@ -36,14 +35,14 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase {
                return $this->doApiRequest( array_merge(
                        [ 'action' => 'query', 'list' => 'watchlistraw' ],
                        $params
-               ) );
+               ), null, false, $this->getLoggedInTestUser() );
        }
 
        private function doGeneratorWatchlistRawRequest( array $params = [] ) {
                return $this->doApiRequest( array_merge(
                        [ 'action' => 'query', 'generator' => 'watchlistraw' ],
                        $params
-               ) );
+               ), null, false, $this->getLoggedInTestUser() );
        }
 
        private function getItemsFromApiResponse( array $response ) {
@@ -477,7 +476,7 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase {
                        new TitleValue( 1, 'ApiQueryWatchlistRawIntegrationTestPage1' ),
                ] );
 
-               ObjectCache::getMainWANInstance()->clearProcessCache();
+               MediaWikiServices::getInstance()->getMainWANObjectCache()->clearProcessCache();
                $result = $this->doListWatchlistRawRequest( [
                        'wrowner' => $otherUser->getName(),
                        'wrtoken' => '1234567890',