aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/MockApi.php
blob: 3a2783b03e365f650cf12a2f100e2bea8b24461e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

namespace MediaWiki\Tests\Api;

use MediaWiki\Api\ApiBase;

class MockApi extends ApiBase {
	/** @var array */
	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,
		];
	}
}