Improve test coverage for ApiDelete.php
[lhc/web/wiklou.git] / includes / api / ApiDelete.php
index e19f1f2..a63dee6 100644 (file)
@@ -116,7 +116,8 @@ class ApiDelete extends ApiBase {
                        $hasHistory = false;
                        $reason = $page->getAutoDeleteReason( $hasHistory );
                        if ( $reason === false ) {
-                               return Status::newFatal( 'cannotdelete', $title->getPrefixedText() );
+                               // Should be reachable only if the page has no revisions
+                               return Status::newFatal( 'cannotdelete', $title->getPrefixedText() ); // @codeCoverageIgnore
                        }
                }