]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - tests/phpunit/includes/api/MockApi.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / tests / phpunit / includes / api / MockApi.php
diff --git a/tests/phpunit/includes/api/MockApi.php b/tests/phpunit/includes/api/MockApi.php
new file mode 100644 (file)
index 0000000..1407c10
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+class MockApi extends ApiBase {
+       public $warnings = [];
+
+       public function execute() {
+       }
+
+       public function __construct() {
+       }
+
+       public function getModulePath() {
+               return $this->getModuleName();
+       }
+
+       public function addWarning( $warning, $code = null, $data = null ) {
+               $this->warnings[] = $warning;
+       }
+
+       public function getAllowedParams() {
+               return [
+                       'filename' => null,
+                       'enablechunks' => false,
+                       'sessionkey' => null,
+               ];
+       }
+}