$data = $this->doApiRequest( array(
'action' => 'rollback',
'title' => 'Main Page',
- 'user' => self::$user->userName,
+ 'user' => $pageinfo['user'],
'token' => $pageinfo['rollbacktoken'],
'watchlist' => 'watch' ), $data );
} catch( UsageException $ue ) {
if( $ue->getCodeString() == 'onlyauthor' ) {
$this->markTestIncomplete( "Only one author to 'Main Page', cannot test rollback" );
+ } else {
+ $this->fail( "Received error " . $ue->getCodeString() );
}
}
+
$this->assertArrayHasKey( 'rollback', $data[0] );
$this->assertArrayHasKey( 'title', $data[0]['rollback'] );
}