X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiQueryWatchlistRawIntegrationTest.php;h=2af63c4983e30e60c326bba31632190e1b03e056;hb=ed40e8ec5312481438b7369f0053219e51e0eb5e;hp=582c0769a2ef5bb7d1947f370594a1ca95e8ce7c;hpb=2b8d66c4cd4836b44464e0b33134dd6a9d27212c;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php b/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php index 582c0769a2..2af63c4983 100644 --- a/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php +++ b/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php @@ -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,6 +476,7 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase { new TitleValue( 1, 'ApiQueryWatchlistRawIntegrationTestPage1' ), ] ); + ObjectCache::getMainWANInstance()->clearProcessCache(); $result = $this->doListWatchlistRawRequest( [ 'wrowner' => $otherUser->getName(), 'wrtoken' => '1234567890', @@ -502,7 +502,7 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase { $otherUser->setOption( 'watchlisttoken', '1234567890' ); $otherUser->saveSettings(); - $this->setExpectedException( UsageException::class, 'Incorrect watchlist token provided' ); + $this->setExpectedException( ApiUsageException::class, 'Incorrect watchlist token provided' ); $this->doListWatchlistRawRequest( [ 'wrowner' => $otherUser->getName(), @@ -511,7 +511,7 @@ class ApiQueryWatchlistRawIntegrationTest extends ApiTestCase { } public function testOwnerAndTokenParams_userHasNoWatchlistToken() { - $this->setExpectedException( UsageException::class, 'Incorrect watchlist token provided' ); + $this->setExpectedException( ApiUsageException::class, 'Incorrect watchlist token provided' ); $this->doListWatchlistRawRequest( [ 'wrowner' => $this->getNotLoggedInTestUser()->getName(),