Completed
Pull Request — master (#68)
by
unknown
05:21
created
tests/bootstrap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ) {
4
-	die( 'Not an entry point' );
3
+if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
4
+	die('Not an entry point');
5 5
 }
6 6
 
7
-if ( !is_readable( $autoloaderClassPath = __DIR__ . '/../../SemanticMediaWiki/tests/autoloader.php' ) ) {
8
-	die( 'The SemanticMediaWiki test autoloader is not available' );
7
+if (!is_readable($autoloaderClassPath = __DIR__ . '/../../SemanticMediaWiki/tests/autoloader.php')) {
8
+	die('The SemanticMediaWiki test autoloader is not available');
9 9
 }
10 10
 
11
-print sprintf( "\n%-20s%s\n", "Semantic Compound Queries: ", SCQ_VERSION );
11
+print sprintf("\n%-20s%s\n", "Semantic Compound Queries: ", SCQ_VERSION);
Please login to merge, or discard this patch.
tests/phpunit/Integration/I18nJsonFileIntegrityTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 	/**
18 18
 	 * @dataProvider i18nFileProvider
19 19
 	 */
20
-	public function testI18NJsonDecodeEncode( $file ) {
20
+	public function testI18NJsonDecodeEncode($file) {
21 21
 
22
-		$jsonFileReader = UtilityFactory::getInstance()->newJsonFileReader( $file );
22
+		$jsonFileReader = UtilityFactory::getInstance()->newJsonFileReader($file);
23 23
 
24 24
 		$this->assertIsInt(
25 25
 			$jsonFileReader->getModificationTime()
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 		$provider = [];
36 36
 		$location = $GLOBALS['wgMessagesDirs']['SemanticCompoundQueries'];
37 37
 
38
-		$bulkFileProvider = UtilityFactory::getInstance()->newBulkFileProvider( $location );
39
-		$bulkFileProvider->searchByFileExtension( 'json' );
38
+		$bulkFileProvider = UtilityFactory::getInstance()->newBulkFileProvider($location);
39
+		$bulkFileProvider->searchByFileExtension('json');
40 40
 
41
-		foreach ( $bulkFileProvider->getFiles() as $file ) {
42
-			$provider[] = [ $file ];
41
+		foreach ($bulkFileProvider->getFiles() as $file) {
42
+			$provider[] = [$file];
43 43
 		}
44 44
 
45 45
 		return $provider;
Please login to merge, or discard this patch.
tests/phpunit/Unit/Api/CompoundQueryTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	public function testCanConstruct() {
30 30
 
31 31
 		$instance = new CompoundQuery(
32
-			$this->apiFactory->newApiMain( [ 'query' => 'Foo' ] ),
32
+			$this->apiFactory->newApiMain(['query' => 'Foo']),
33 33
 			'compoundquery'
34 34
 		);
35 35
 
@@ -42,22 +42,22 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * @dataProvider sampleQueryProvider
44 44
 	 */
45
-	public function testExecute( array $query, array $expected ) {
45
+	public function testExecute(array $query, array $expected) {
46 46
 
47
-		$results = $this->apiFactory->doApiRequest( [
47
+		$results = $this->apiFactory->doApiRequest([
48 48
 			'action' => 'compoundquery',
49
-			'query' => implode( '|', $query )
50
-		] );
49
+			'query' => implode('|', $query)
50
+		]);
51 51
 
52 52
 		$this->assertIsArray(
53 53
 			$results
54 54
 		);
55 55
 
56 56
 		// If their is no printrequests array we expect an error array
57
-		if ( isset( $results['query']['printrequests'] ) ) {
58
-			$this->assertEquals( $expected, $results['query']['printrequests'] );
57
+		if (isset($results['query']['printrequests'])) {
58
+			$this->assertEquals($expected, $results['query']['printrequests']);
59 59
 		} else {
60
-			$this->assertArrayHasKey( 'error', $results );
60
+			$this->assertArrayHasKey('error', $results);
61 61
 		}
62 62
 	}
63 63
 
Please login to merge, or discard this patch.