}
function addDBData() {
- $user = User::newFromName( 'UTBlockee' );
+ $user = User::newFromName( 'UTApiBlockee' );
if ( $user->getId() == 0 ) {
$user->addToDatabase();
- $user->setPassword( 'UTBlockeePassword' );
+ $user->setPassword( 'UTApiBlockeePassword' );
$user->saveSettings();
}
$data = $this->getTokens();
- $user = User::newFromName( 'UTBlockee' );
+ $user = User::newFromName( 'UTApiBlockee' );
if ( !$user->getId() ) {
- $this->markTestIncomplete( "The user UTBlockee does not exist" );
+ $this->markTestIncomplete( "The user UTApiBlockee does not exist" );
}
if( !isset( $data[0]['query']['pages'] ) ) {
$data = $this->doApiRequest( array(
'action' => 'block',
- 'user' => 'UTBlockee',
+ 'user' => 'UTApiBlockee',
'reason' => 'Some reason',
'token' => $pageinfo['blocktoken'] ), $data );
- $block = Block::newFromTarget('UTBlockee');
+ $block = Block::newFromTarget('UTApiBlockee');
$this->assertTrue( !is_null( $block ), 'Block is valid' );
- $this->assertEquals( 'UTBlockee', (string)$block->getTarget() );
+ $this->assertEquals( 'UTApiBlockee', (string)$block->getTarget() );
$this->assertEquals( 'Some reason', $block->mReason );
$this->assertEquals( 'infinity', $block->mExpiry );