From 14f74d141ab5580688bfd46d2f74c026e43ed967 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 1 Apr 2015 06:11:44 +0200 Subject: Update to MediaWiki 1.24.2 --- tests/phpunit/includes/api/ApiBaseTest.php | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/phpunit/includes/api/ApiBaseTest.php (limited to 'tests/phpunit/includes/api/ApiBaseTest.php') diff --git a/tests/phpunit/includes/api/ApiBaseTest.php b/tests/phpunit/includes/api/ApiBaseTest.php new file mode 100644 index 00000000..a05c4fa8 --- /dev/null +++ b/tests/phpunit/includes/api/ApiBaseTest.php @@ -0,0 +1,46 @@ +requireOnlyOneParameter( + array( "filename" => "foo.txt", "enablechunks" => false ), + "filename", "enablechunks" + ); + $this->assertTrue( true ); + } + + /** + * @expectedException UsageException + * @covers ApiBase::requireOnlyOneParameter + */ + public function testRequireOnlyOneParameterZero() { + $mock = new MockApi(); + $mock->requireOnlyOneParameter( + array( "filename" => "foo.txt", "enablechunks" => 0 ), + "filename", "enablechunks" + ); + } + + /** + * @expectedException UsageException + * @covers ApiBase::requireOnlyOneParameter + */ + public function testRequireOnlyOneParameterTrue() { + $mock = new MockApi(); + $mock->requireOnlyOneParameter( + array( "filename" => "foo.txt", "enablechunks" => true ), + "filename", "enablechunks" + ); + } + +} -- cgit v1.2.3-54-g00ecf