8 class ApiBaseTest
extends ApiTestCase
{
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 );
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"
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"