$data = $this->doApiRequest( array(
'action' => 'edit',
- 'title' => 'UTPage',
+ 'title' => 'Help:UTPage', // Help namespace is hopefully wikitext
'text' => 'new text',
'token' => $pageinfo['edittoken'],
'watchlist' => 'watch' ) );
$data = $this->doApiRequest( array(
'action' => 'protect',
'token' => $pageinfo['protecttoken'],
- 'title' => 'UTPage',
+ 'title' => 'Help:UTPage',
'protections' => 'edit=sysop',
'watchlist' => 'unwatch' ) );
$pageinfo = $this->getTokens();
- if ( !Title::newFromText( 'UTPage' )->exists() ) {
- $this->markTestSkipped( "The article [[UTPage]] does not exist" ); //TODO: just create it?
+ if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
+ $this->markTestSkipped( "The article [[Help:UTPage]] does not exist" ); //TODO: just create it?
}
$data = $this->doApiRequest( array(
'action' => 'query',
'prop' => 'revisions',
- 'titles' => 'UTPage',
+ 'titles' => 'Help:UTPage',
'rvtoken' => 'rollback' ) );
$this->assertArrayHasKey( 'query', $data[0] );
$key = array_pop( $keys );
if ( isset( $data[0]['query']['pages'][$key]['missing'] ) ) {
- $this->markTestSkipped( "Target page (UTPage) doesn't exist" );
+ $this->markTestSkipped( "Target page (Help:UTPage) doesn't exist" );
}
$this->assertArrayHasKey( 'pageid', $data[0]['query']['pages'][$key] );
try {
$data = $this->doApiRequest( array(
'action' => 'rollback',
- 'title' => 'UTPage',
+ 'title' => 'Help:UTPage',
'user' => $revinfo['user'],
'token' => $pageinfo['rollbacktoken'],
'watchlist' => 'watch' ) );
$this->assertArrayHasKey( 'title', $data[0]['rollback'] );
} catch( UsageException $ue ) {
if( $ue->getCodeString() == 'onlyauthor' ) {
- $this->markTestIncomplete( "Only one author to 'UTPage', cannot test rollback" );
+ $this->markTestIncomplete( "Only one author to 'Help:UTPage', cannot test rollback" );
} else {
$this->fail( "Received error '" . $ue->getCodeString() . "'" );
}
$data = $this->doApiRequest( array(
'action' => 'delete',
'token' => $pageinfo['deletetoken'],
- 'title' => 'UTPage' ) );
+ 'title' => 'Help:UTPage' ) );
$this->assertArrayHasKey( 'delete', $data[0] );
$this->assertArrayHasKey( 'title', $data[0]['delete'] );