Completed
Push — master ( 76e8cc...c0fccf )
by GIT
44:13 queued 24:08
created
tests/phpunit/Unit/OutputTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,24 +24,24 @@
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	protected function tearDown(): void {
27
-		unset( $this->data );
27
+		unset($this->data);
28 28
 		parent::tearDown();
29 29
 	}
30 30
 
31 31
 	public function testCanConstruct() {
32
-		$this->assertInstanceOf( '\SFS\Output', new Output() );
32
+		$this->assertInstanceOf('\SFS\Output', new Output());
33 33
 	}
34 34
 
35 35
 	public function testAddToHeadItem() {
36
-		$ret = Output::addToHeadItem( $this->data );
36
+		$ret = Output::addToHeadItem($this->data);
37 37
 
38
-		$this->assertArrayHasKey( 'Foo', $ret );
39
-		$this->assertArrayHasKey( 'Spam', $ret );
38
+		$this->assertArrayHasKey('Foo', $ret);
39
+		$this->assertArrayHasKey('Spam', $ret);
40 40
 	}
41 41
 
42 42
 	public function testCommitToParserOutput() {
43 43
 		global $wgOut;
44
-		$expected_result = '[' . json_encode( $this->data ) . ']';
44
+		$expected_result = '['.json_encode($this->data).']';
45 45
 		Output::commitToParserOutput();
46 46
 		$this->assertEquals(
47 47
 			$expected_result, $wgOut->getJsConfigVars()['sf_select']
Please login to merge, or discard this patch.
tests/phpunit/Unit/ApiSemanticFormsSelectTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	protected function setUp(): void {
26 26
 		parent::setUp();
27 27
 		$parameters = [ 'action' => 'sformsselect', 'approach' => 'smw',
28
-		                     'query'  => 'abc', 'sep' => ',' ];
28
+							 'query'  => 'abc', 'sep' => ',' ];
29 29
 
30 30
 		$this->ApiMain = new ApiMain(
31 31
 			$this->newRequestContext( $parameters ), true
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 	public function testGetParamDescription() {
71 71
 		$tdata = [ 'approach' => 'The actual approach: function or smw',
72
-		                'query'    => 'The query of the former' ];
72
+						'query'    => 'The query of the former' ];
73 73
 		$this->assertEquals( $this->ApiSFS->getParamDescription(), $tdata );
74 74
 	}
75 75
 
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 
25 25
 	protected function setUp(): void {
26 26
 		parent::setUp();
27
-		$parameters = [ 'action' => 'sformsselect', 'approach' => 'smw',
28
-		                     'query'  => 'abc', 'sep' => ',' ];
27
+		$parameters = ['action' => 'sformsselect', 'approach' => 'smw',
28
+		                     'query'  => 'abc', 'sep' => ','];
29 29
 
30 30
 		$this->ApiMain = new ApiMain(
31
-			$this->newRequestContext( $parameters ), true
31
+			$this->newRequestContext($parameters), true
32 32
 		);
33 33
 		$this->ApiSFS = new ApiSemanticFormsSelect(
34 34
 			$this->ApiMain, 'sformsselect'
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	protected function tearDown(): void {
39
-		unset( $this->ApiSFS );
40
-		unset( $this->ApiMain );
39
+		unset($this->ApiSFS);
40
+		unset($this->ApiMain);
41 41
 		parent::tearDown();
42 42
 	}
43 43
 
44 44
 
45 45
 	public function testCanConstruct() {
46 46
 
47
-		$apiMain = new ApiMain( $this->newRequestContext( [] ), true );
47
+		$apiMain = new ApiMain($this->newRequestContext([]), true);
48 48
 
49 49
 		$instance = new ApiSemanticFormsSelect(
50 50
 			$apiMain, 'sformsselect'
@@ -63,30 +63,30 @@  discard block
 block discarded – undo
63 63
 	}
64 64
 
65 65
 	public function testGetDescription() {
66
-		$tdata = [ 'API for providing SemanticFormsSelect values' ];
67
-		$this->assertEquals( $this->ApiSFS->getDescription(), $tdata );
66
+		$tdata = ['API for providing SemanticFormsSelect values'];
67
+		$this->assertEquals($this->ApiSFS->getDescription(), $tdata);
68 68
 	}
69 69
 
70 70
 	public function testGetParamDescription() {
71
-		$tdata = [ 'approach' => 'The actual approach: function or smw',
72
-		                'query'    => 'The query of the former' ];
73
-		$this->assertEquals( $this->ApiSFS->getParamDescription(), $tdata );
71
+		$tdata = ['approach' => 'The actual approach: function or smw',
72
+		                'query'    => 'The query of the former'];
73
+		$this->assertEquals($this->ApiSFS->getParamDescription(), $tdata);
74 74
 	}
75 75
 
76 76
 	public function testGetVersion() {
77 77
 		$tdata = 'SFS\ApiSemanticFormsSelect: 1.1';
78
-		$this->assertEquals( $this->ApiSFS->getVersion(), $tdata );
78
+		$this->assertEquals($this->ApiSFS->getVersion(), $tdata);
79 79
 	}
80 80
 
81 81
 
82
-	private function newRequestContext( $request = [] ) {
82
+	private function newRequestContext($request = []) {
83 83
 
84 84
 		$context = new RequestContext();
85 85
 
86
-		if ( $request instanceof WebRequest ) {
87
-			$context->setRequest( $request );
86
+		if ($request instanceof WebRequest) {
87
+			$context->setRequest($request);
88 88
 		} else {
89
-			$context->setRequest( new FauxRequest( $request, true ) );
89
+			$context->setRequest(new FauxRequest($request, true));
90 90
 		}
91 91
 
92 92
 		return $context;
Please login to merge, or discard this patch.