Fix "Incorrect watchlist token provided" unit test errors
[lhc/web/wiklou.git] / tests / phpunit / includes / api / MockApi.php
index 516da0c..d7db538 100644 (file)
@@ -1,17 +1,23 @@
 <?php
 
 class MockApi extends ApiBase {
+       public $warnings = [];
+
        public function execute() {
        }
 
        public function __construct() {
        }
 
+       public function setWarning( $warning ) {
+               $this->warnings[] = $warning;
+       }
+
        public function getAllowedParams() {
-               return array(
+               return [
                        'filename' => null,
                        'enablechunks' => false,
                        'sessionkey' => null,
-               );
+               ];
        }
 }