/**
* @group API
* @group Database
+ * @group medium
* @todo This test suite is severly broken and need a full review
*/
class ApiWatchTest extends ApiTestCase {
-
protected function setUp() {
parent::setUp();
$this->doLogin();
/**
*/
function testGetRollbackToken() {
-
- $pageinfo = $this->getTokens();
+ $this->getTokens();
if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
$this->markTestSkipped( "The article [[Help:UTPage]] does not exist" ); //TODO: just create it?
$this->assertArrayHasKey( 'rollback', $data[0] );
$this->assertArrayHasKey( 'title', $data[0]['rollback'] );
- } catch( UsageException $ue ) {
- if( $ue->getCodeString() == 'onlyauthor' ) {
+ } catch ( UsageException $ue ) {
+ if ( $ue->getCodeString() == 'onlyauthor' ) {
$this->markTestIncomplete( "Only one author to 'Help:UTPage', cannot test rollback" );
} else {
$this->fail( "Received error '" . $ue->getCodeString() . "'" );
$this->assertArrayHasKey( 'delete', $data[0] );
$this->assertArrayHasKey( 'title', $data[0]['delete'] );
- $data = $this->doApiRequest( array(
+ $this->doApiRequest( array(
'action' => 'query',
'list' => 'watchlist' ) );