$this->assertFalse( Title::newFromText( $name )->exists() );
}
+ public function testBatchedDelete() {
+ $this->setMwGlobals( 'wgDeleteRevisionsBatchSize', 1 );
+
+ $name = 'Help:' . ucfirst( __FUNCTION__ );
+ for ( $i = 1; $i <= 3; $i++ ) {
+ $this->editPage( $name, "Revision $i" );
+ }
+
+ $apiResult = $this->doApiRequestWithToken( [
+ 'action' => 'delete',
+ 'title' => $name,
+ ] )[0];
+
+ $this->assertArrayHasKey( 'delete', $apiResult );
+ $this->assertArrayHasKey( 'title', $apiResult['delete'] );
+ $this->assertSame( $name, $apiResult['delete']['title'] );
+ $this->assertArrayHasKey( 'scheduled', $apiResult['delete'] );
+ $this->assertTrue( $apiResult['delete']['scheduled'] );
+ $this->assertArrayNotHasKey( 'logid', $apiResult['delete'] );
+
+ // Run the jobs
+ JobQueueGroup::destroySingletons();
+ $jobs = new RunJobs;
+ $jobs->loadParamsAndArgs( null, [ 'quiet' => true ], null );
+ $jobs->execute();
+
+ $this->assertFalse( Title::newFromText( $name )->exists( Title::GAID_FOR_UPDATE ) );
+ }
+
public function testDeleteNonexistent() {
$this->setExpectedException( ApiUsageException::class,
"The page you specified doesn't exist." );
__METHOD__,
[],
[
- 'change_tag' => [ 'INNER JOIN', 'ct_log_id = log_id' ],
- 'change_tag_def' => [ 'INNER JOIN', 'ctd_id = ct_tag_id' ]
+ 'change_tag' => [ 'JOIN', 'ct_log_id = log_id' ],
+ 'change_tag_def' => [ 'JOIN', 'ctd_id = ct_tag_id' ]
]
) );
}