Passed
Pull Request — master (#17)
by
unknown
02:39
created

SimpleBatchUploadTest::testgetMaxFilesPerBatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SimpleBatchUpload;
4
5
/**
6
 * Class SimpleBatchUploadTest
7
 * @package SimpleBatchUpload
8
 * @group   Database
9
 */
10
class SimpleBatchUploadTest extends \MediaWikiTestCase {
0 ignored issues
show
Bug introduced by
The type MediaWikiTestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
12
	private $testConfig = [
13
		'*' => 1,
14
		'user' => 2,
15
		'sysop' => 3
16
	];
17
18
	protected function setUp() {
19
		parent::setUp();
20
		$this->setMwGlobals( [
21
			'wgSimpleBatchUploadMaxFilesPerBatch' => $this->testConfig
22
		] );
23
	}
24
25
	/**
26
	 * @covers SimpleBatchUpload\SimpleBatchUpload::getMaxFilesPerBatch
27
	 */
28
	public function testgetMaxFilesPerBatch() {
29
		$sbu = new SimpleBatchUpload();
30
		$this->assertEquals( $this->testConfig, $sbu->getMaxFilesPerBatch() );
31
		$testConfig = [
32
			'*' => 999
33
		];
34
		$sbu->setMaxFilesPerBatch( $testConfig );
35
		$this->assertEquals( $testConfig, $sbu->getMaxFilesPerBatch() );
36
	}
37
38
}
39