'ctd_name',
[ 'ct_rev_id' => $revId ],
__METHOD__,
- [ 'change_tag_def' => [ 'INNER JOIN', 'ctd_id = ct_tag_id' ] ]
+ [ 'change_tag_def' => [ 'JOIN', 'ctd_id = ct_tag_id' ] ]
)
);
}
public function testEditWhileBlocked() {
$name = 'Help:' . ucfirst( __FUNCTION__ );
- $this->setExpectedException( ApiUsageException::class,
- 'You have been blocked from editing.' );
+ $this->assertNull( Block::newFromTarget( '127.0.0.1' ), 'Sanity check' );
$block = new Block( [
'address' => self::$users['sysop']->getUser()->getName(),
'reason' => 'Capriciousness',
'timestamp' => '19370101000000',
'expiry' => 'infinity',
+ 'enableAutoblock' => true,
] );
$block->insert();
'title' => $name,
'text' => 'Some text',
] );
+ $this->fail( 'Expected exception not thrown' );
+ } catch ( ApiUsageException $ex ) {
+ $this->assertSame( 'You have been blocked from editing.', $ex->getMessage() );
+ $this->assertNotNull( Block::newFromTarget( '127.0.0.1' ), 'Autoblock spread' );
} finally {
$block->delete();
self::$users['sysop']->getUser()->clearInstanceCache();