Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F584967
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php
index 75dffd70a0b..fe91ca63a68 100644
--- a/maintenance/deleteBatch.php
+++ b/maintenance/deleteBatch.php
@@ -134,9 +134,10 @@ class DeleteBatch extends Maintenance {
->deleteUnsafe( $reason );
if ( $status->isOK() ) {
- $this->output( " Deleted!\n" );
+ $this->output( " Deleted $line!\n" );
} else {
- $this->output( " FAILED to delete article\n" );
+ $this->output( " FAILED to delete page $line\n" );
+ $this->error( $status );
}
if ( $interval ) {
diff --git a/tests/phpunit/maintenance/DeleteBatchTest.php b/tests/phpunit/maintenance/DeleteBatchTest.php
index abcc1a91464..72d29e17beb 100644
--- a/tests/phpunit/maintenance/DeleteBatchTest.php
+++ b/tests/phpunit/maintenance/DeleteBatchTest.php
@@ -50,8 +50,9 @@ class DeleteBatchTest extends MaintenanceBaseTestCase {
$fileContents = '';
$expectedOutputRegex = '/';
foreach ( $existingPages as $page ) {
- $fileContents .= $page->getTitle()->getPrefixedText() . PHP_EOL;
- $expectedOutputRegex .= ".*Deleted!\n";
+ $text = $page->getTitle()->getPrefixedText();
+ $fileContents .= $text . PHP_EOL;
+ $expectedOutputRegex .= ".*Deleted $text!\n";
}
$this->expectOutputRegex( $expectedOutputRegex . '/' );
$this->commonTestExecute( [], $fileContents, $existingPages );
@@ -66,8 +67,9 @@ class DeleteBatchTest extends MaintenanceBaseTestCase {
$fileContents = '';
$expectedOutputRegex = '/';
foreach ( $existingPages as $page ) {
- $fileContents .= $page->getId() . PHP_EOL;
- $expectedOutputRegex .= ".*Deleted!\n";
+ $pageId = $page->getId();
+ $fileContents .= $pageId . PHP_EOL;
+ $expectedOutputRegex .= ".*Deleted $pageId!\n";
}
$this->expectOutputRegex( $expectedOutputRegex . '/' );
$this->commonTestExecute( [ 'by-id' => 1 ], $fileContents, $existingPages );
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:31 AM (11 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227439
Default Alt Text
(1 KB)
Attached To
Mode
rMW mediawiki
Attached
Detach File
Event Timeline
Log In to Comment