Merge "DatabaseMssql: Don't duplicate body of makeList()"
[mediawiki.git] / tests / phpunit / includes / api / ApiBaseTest.php
bloba05c4fa83114212129efcb56781ab504407a1598
1 <?php
3 /**
4 * @group API
5 * @group Database
6 * @group medium
7 */
8 class ApiBaseTest extends ApiTestCase {
10 /**
11 * @covers ApiBase::requireOnlyOneParameter
13 public function testRequireOnlyOneParameterDefault() {
14 $mock = new MockApi();
15 $mock->requireOnlyOneParameter(
16 array( "filename" => "foo.txt", "enablechunks" => false ),
17 "filename", "enablechunks"
19 $this->assertTrue( true );
22 /**
23 * @expectedException UsageException
24 * @covers ApiBase::requireOnlyOneParameter
26 public function testRequireOnlyOneParameterZero() {
27 $mock = new MockApi();
28 $mock->requireOnlyOneParameter(
29 array( "filename" => "foo.txt", "enablechunks" => 0 ),
30 "filename", "enablechunks"
34 /**
35 * @expectedException UsageException
36 * @covers ApiBase::requireOnlyOneParameter
38 public function testRequireOnlyOneParameterTrue() {
39 $mock = new MockApi();
40 $mock->requireOnlyOneParameter(
41 array( "filename" => "foo.txt", "enablechunks" => true ),
42 "filename", "enablechunks"