= $this->getMutableTestUser();
self::$users['ApiQueryWatchlistRawIntegrationTestUser2']
= $this->getMutableTestUser();
- $this->doLogin( 'ApiQueryWatchlistRawIntegrationTestUser' );
}
private function getLoggedInTestUser() {
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 ) {
$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(),
}
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(),