Passed
Push — develop ( 86ca6f...0e6a78 )
by Mathias
22:00 queued 14:21
created
module/Core/test/CoreTest/Form/SummaryFormButtonsFieldsetTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     protected $target;
23 23
 
24
-    public function setUp(){
24
+    public function setUp() {
25 25
         $this->target = new SummaryFormButtonsFieldset();
26 26
     }
27 27
 
@@ -39,20 +39,20 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function testSetGetFormId()
41 41
     {
42
-        $id=123;
42
+        $id = 123;
43 43
         $this->target->setFormId($id);
44
-        $this->assertSame($this->target->getFormId(), (string)$id);
44
+        $this->assertSame($this->target->getFormId(), (string) $id);
45 45
     }
46 46
 
47 47
     public function testSetAttribute()
48 48
     {
49
-        $this->target->setAttribute('id',123);
49
+        $this->target->setAttribute('id', 123);
50 50
         $this->assertSame($this->target->getFormId(), "123");
51 51
     }
52 52
 
53 53
     public function testSetAttributeSomeAttribute()
54 54
     {
55
-        $this->target->setAttribute('foo','bar');
55
+        $this->target->setAttribute('foo', 'bar');
56 56
         $this->assertSame($this->target->getFormId(), false);
57 57
     }
58 58
 }
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/MetaDataFieldsetTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 
32 32
     private $target = MetaDataFieldset::class;
33 33
 
34
-    private $inheritance = [ Fieldset::class ];
34
+    private $inheritance = [Fieldset::class];
35 35
 
36 36
     private $properties = [
37
-        [ 'hydrator', ['default@' => MetaDataHydrator::class, '@value' => EntityHydrator::class]]
37
+        ['hydrator', ['default@' => MetaDataHydrator::class, '@value' => EntityHydrator::class]]
38 38
     ];
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/DefaultButtonsFieldsetTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     protected $target;
23 23
 
24
-    public function setUp(){
24
+    public function setUp() {
25 25
         $this->target = new DefaultButtonsFieldset();
26 26
     }
27 27
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     }
33 33
 
34 34
 
35
-    public function testInit(){
35
+    public function testInit() {
36 36
         /*@todo*/
37 37
     }
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/I18n/LocaleTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
     protected $localeService;
33 33
     
34 34
     /**
35
-	 * @see PHPUnit_Framework_TestCase::setUp()
36
-	 */
37
-	protected function setUp()
38
-	{
39
-		$this->localeService = new LocaleService($this->languages);
35
+     * @see PHPUnit_Framework_TestCase::setUp()
36
+     */
37
+    protected function setUp()
38
+    {
39
+        $this->localeService = new LocaleService($this->languages);
40 40
 		
41
-	}
41
+    }
42 42
 
43 43
     public function testGetDefaultLanguage()
44 44
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/View/Helper/AjaxUrlTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,18 +37,18 @@  discard block
 block discarded – undo
37 37
     private $target = [
38 38
         AjaxUrl::class,
39 39
         [self::BASEPATH],
40
-        '@testInheritance' => [ 'as_reflection' => true ],
40
+        '@testInheritance' => ['as_reflection' => true],
41 41
         '@testConstruction' => false,
42 42
     ];
43 43
 
44
-    private $inheritance = [ AbstractHelper::class ];
44
+    private $inheritance = [AbstractHelper::class];
45 45
 
46 46
     public function testConstruction()
47 47
     {
48 48
         $basepath = '/test/path/no/slash';
49 49
         $target   = new AjaxUrl($basepath);
50 50
 
51
-        $this->assertAttributeSame($basepath . '/' , 'basePath', $target);
51
+        $this->assertAttributeSame($basepath.'/', 'basePath', $target);
52 52
 
53 53
         $basepath = '/test/path/slash/';
54 54
         $target   = new AjaxUrl($basepath);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     {
76 76
         $url = $this->target->__invoke(...$args);
77 77
 
78
-        $expect = self::BASEPATH . $expect;
78
+        $expect = self::BASEPATH.$expect;
79 79
         $this->assertEquals($expect, $url);
80 80
     }
81 81
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/View/Helper/SnippetTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
 
98 98
     public function testReturnsEmptyString()
99 99
     {
100
-    	$event = $this->args['event'];
100
+        $event = $this->args['event'];
101 101
         $event->setName('nothingToDo');
102 102
         $event->setTarget($this->target);
103 103
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         '@testConstruction' => false,
39 39
     ];
40 40
 
41
-    private $inheritance = [ AbstractHelper::class ];
41
+    private $inheritance = [AbstractHelper::class];
42 42
 
43 43
     private function getTargetArgs()
44 44
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/View/Helper/ProxyTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,19 +60,19 @@  discard block
 block discarded – undo
60 60
 
61 61
     private function injectHelperManager($services = [])
62 62
     {
63
-    	$sm = $this->createServiceManagerMock();
63
+        $sm = $this->createServiceManagerMock();
64 64
         $manager = $this->createPluginManagerMock($services,$sm);
65 65
 
66 66
         $renderer = $this->getMockBuilder(PhpRenderer::class)
67
-			->disableOriginalConstructor()
67
+            ->disableOriginalConstructor()
68 68
             ->setMethods(['getHelperPluginManager'])
69 69
             ->getMock()
70 70
         ;
71 71
 
72 72
         $renderer
73
-	        ->expects($this->any())
74
-	        ->method('getHelperPluginManager')
75
-	        ->will($this->returnValue($manager))
73
+            ->expects($this->any())
74
+            ->method('getHelperPluginManager')
75
+            ->will($this->returnValue($manager))
76 76
         ;
77 77
 	    
78 78
         $this->target->setView($renderer);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $options = ['option' => 'value'];
154 154
         $this->injectHelperManager(['helper' => PtHelperDummy::class]);
155 155
         $this->helperManager
156
-	        ->setExpectedCallCount('get', 'helper', $options, 1)
156
+            ->setExpectedCallCount('get', 'helper', $options, 1)
157 157
         ;
158 158
 
159 159
         $this->target->plugin('helper', $options);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         ],
50 50
     ];
51 51
 
52
-    private $inheritance = [ AbstractHelper::class ];
52
+    private $inheritance = [AbstractHelper::class];
53 53
 
54 54
     /**
55 55
      *
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     private function injectHelperManager($services = [])
62 62
     {
63 63
     	$sm = $this->createServiceManagerMock();
64
-        $manager = $this->createPluginManagerMock($services,$sm);
64
+        $manager = $this->createPluginManagerMock($services, $sm);
65 65
 
66 66
         $renderer = $this->getMockBuilder(PhpRenderer::class)
67 67
 			->disableOriginalConstructor()
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Service/ClearCacheServiceTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @throws \Exception
93 93
      * @dataProvider    getTestClearCache
94 94
      */
95
-    public function testClearCache($cacheDir, $expectThrow=false, $message='Test Cache Directory')
95
+    public function testClearCache($cacheDir, $expectThrow = false, $message = 'Test Cache Directory')
96 96
     {
97 97
         $options = $this->getMockBuilder(ListenerOptions::class)
98 98
             ->disableOriginalConstructor()
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $cacheDir = sys_get_temp_dir().'/yawik/test-cache';
117 117
         return [
118
-            [null,true,'Test with null cache directory'],
119
-            [sys_get_temp_dir().'/foo',true,'Test with non existent directory'],
120
-            [$cacheDir,false,'Test with valid cache directory']
118
+            [null, true, 'Test with null cache directory'],
119
+            [sys_get_temp_dir().'/foo', true, 'Test with non existent directory'],
120
+            [$cacheDir, false, 'Test with valid cache directory']
121 121
         ];
122 122
     }
123 123
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/DeferredListenerAggregateTest.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function testAttachesAndDetachesToAndFromAnEventManager()
128 128
     {
129
-    	$testListener = new DLATListenerMock();
129
+        $testListener = new DLATListenerMock();
130 130
         $this->target->setListener('test01', 'service01');
131 131
         $this->target->setListener('test02', 'service02', 10);
132 132
 		
@@ -136,20 +136,20 @@  discard block
 block discarded – undo
136 136
             ->setMethods(['attach', 'detach'])
137 137
             ->getMock();
138 138
         $events->expects($this->exactly(2))
139
-			->method('attach')
139
+            ->method('attach')
140 140
             ->withConsecutive(
141
-            	[ $this->equalTo('test01'), $this->anything(), $this->equalTo(0) ],
142
-				[ $this->equalTo('test02'), $this->anything(), $this->equalTo(10) ]
141
+                [ $this->equalTo('test01'), $this->anything(), $this->equalTo(0) ],
142
+                [ $this->equalTo('test02'), $this->anything(), $this->equalTo(10) ]
143 143
             )
144 144
             ->will($this->onConsecutiveCalls(
145
-            	[$testListener,'callback'], [$testListener,'callback'])
145
+                [$testListener,'callback'], [$testListener,'callback'])
146 146
             );
147 147
 
148 148
         $events
149
-	        ->expects($this->exactly(2))
150
-	        ->method('detach')
149
+            ->expects($this->exactly(2))
150
+            ->method('detach')
151 151
             ->withConsecutive(
152
-            	[$callback], [$callback] )
152
+                [$callback], [$callback] )
153 153
             ->will($this->onConsecutiveCalls([true, false]))
154 154
         ;
155 155
 
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         '@testFactoryMethodReturnsInstance' => false
41 41
     ];
42 42
 
43
-    protected $inheritance = [ '\Zend\EventManager\ListenerAggregateInterface' ];
43
+    protected $inheritance = ['\Zend\EventManager\ListenerAggregateInterface'];
44 44
     
45 45
     protected $services;
46 46
 
@@ -55,39 +55,39 @@  discard block
 block discarded – undo
55 55
     public function propertiesProvider()
56 56
     {
57 57
         return [
58
-            [ 'listeners', [
59
-                'value' => [ [] ],
60
-                'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ]
58
+            ['listeners', [
59
+                'value' => [[]],
60
+                'setter_exception' => ['\DomainException', 'Listener specification must be an array']
61 61
             ]],
62
-            [ 'listeners', [
63
-                'value' => [ [ 'event' => 'test' ] ],
64
-                'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ]
62
+            ['listeners', [
63
+                'value' => [['event' => 'test']],
64
+                'setter_exception' => ['\DomainException', 'Listener specification must be an array']
65 65
             ]],
66
-            [ 'listeners', [
67
-                'value' => [ [ 'service' => 'test' ] ],
68
-                'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ]
66
+            ['listeners', [
67
+                'value' => [['service' => 'test']],
68
+                'setter_exception' => ['\DomainException', 'Listener specification must be an array']
69 69
             ]],
70
-            [ 'listeners', [
71
-                'value' => [ [ 'event' => 'test', 'service' => 'service' ] ],
70
+            ['listeners', [
71
+                'value' => [['event' => 'test', 'service' => 'service']],
72 72
                 'ignore_getter' => true,
73
-                'post' => ['assertListenerSpecsProperty', [ '', '@target', '###' ] ],
73
+                'post' => ['assertListenerSpecsProperty', ['', '@target', '###']],
74 74
             ]],
75
-            [ 'listeners', [
76
-                'value' => [ [ 'event' => 'test2', 'service' => 'someClass', 'method' => 'method', 'priority' => 12 ] ],
75
+            ['listeners', [
76
+                'value' => [['event' => 'test2', 'service' => 'someClass', 'method' => 'method', 'priority' => 12]],
77 77
                 'ignore_getter' => true,
78
-                'post' => ['assertListenerSpecsProperty', [ '', '@target', '###' ] ],
78
+                'post' => ['assertListenerSpecsProperty', ['', '@target', '###']],
79 79
             ]],
80
-            [ 'listener', [
80
+            ['listener', [
81 81
                 'value' => 'test',
82
-                'setter_args' => [ 'service', 'method', 10 ],
83
-                'setter_value' => [ 'event' => 'test', 'service' => 'service', 'method' => 'method', 'priority' => 10, 'instance' => null ],
82
+                'setter_args' => ['service', 'method', 10],
83
+                'setter_value' => ['event' => 'test', 'service' => 'service', 'method' => 'method', 'priority' => 10, 'instance' => null],
84 84
                 'setter_assert' => 'assertListenerSpecsProperty',
85 85
                 'ignore_getter' => true,
86 86
             ]],
87
-            [ 'listener', [
87
+            ['listener', [
88 88
                 'value' => 'test',
89
-                'setter_args' => [ 'service', 10 ],
90
-                'setter_value' => [ 'event' => 'test', 'service' => 'service', 'method' => null, 'priority' => 10, 'instance' => null ],
89
+                'setter_args' => ['service', 10],
90
+                'setter_value' => ['event' => 'test', 'service' => 'service', 'method' => null, 'priority' => 10, 'instance' => null],
91 91
                 'setter_assert' => 'assertListenerSpecsProperty',
92 92
                 'ignore_getter' => true,
93 93
             ]]
@@ -131,18 +131,18 @@  discard block
 block discarded – undo
131 131
         $this->target->setListener('test02', 'service02', 10);
132 132
 		
133 133
         //In ZF3 EventManager detach should be a callable or it will throws an error
134
-        $callback = [$testListener,'callback'];
134
+        $callback = [$testListener, 'callback'];
135 135
         $events = $this->getMockBuilder(EventManager::class)
136 136
             ->setMethods(['attach', 'detach'])
137 137
             ->getMock();
138 138
         $events->expects($this->exactly(2))
139 139
 			->method('attach')
140 140
             ->withConsecutive(
141
-            	[ $this->equalTo('test01'), $this->anything(), $this->equalTo(0) ],
142
-				[ $this->equalTo('test02'), $this->anything(), $this->equalTo(10) ]
141
+            	[$this->equalTo('test01'), $this->anything(), $this->equalTo(0)],
142
+				[$this->equalTo('test02'), $this->anything(), $this->equalTo(10)]
143 143
             )
144 144
             ->will($this->onConsecutiveCalls(
145
-            	[$testListener,'callback'], [$testListener,'callback'])
145
+            	[$testListener, 'callback'], [$testListener, 'callback'])
146 146
             );
147 147
 
148 148
         $events
@@ -178,13 +178,13 @@  discard block
 block discarded – undo
178 178
     public function listenerProvider()
179 179
     {
180 180
         return [
181
-            [ 'nonExistant', null ],
182
-            [ '\CoreTest\Listener\DLATListenerMock', null ],
183
-            [ 'listener', new DLATListenerMock() ],
184
-            [ 'listener', new DLATListenerMock(), 'invoke' ],
185
-            [ 'listener', new DLATListenerMock(), 'method', 'callback' ],
186
-            [ 'listener', new DLATListenerMock(), 'methodButNone', 'noMethod' ],
187
-            [ 'listener', new DLATNonInvokableListenerMock() ],
181
+            ['nonExistant', null],
182
+            ['\CoreTest\Listener\DLATListenerMock', null],
183
+            ['listener', new DLATListenerMock()],
184
+            ['listener', new DLATListenerMock(), 'invoke'],
185
+            ['listener', new DLATListenerMock(), 'method', 'callback'],
186
+            ['listener', new DLATListenerMock(), 'methodButNone', 'noMethod'],
187
+            ['listener', new DLATNonInvokableListenerMock()],
188 188
         ];
189 189
     }
190 190
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     {
203 203
         if (null === $listener) {
204 204
             if (!class_exists($service, true)) {
205
-                $this->setExpectedException('\UnexpectedValueException', 'Cannot create deferred listener "' . $service );
205
+                $this->setExpectedException('\UnexpectedValueException', 'Cannot create deferred listener "'.$service);
206 206
             }
207 207
             $this->services->expects($this->once())->method('has')->with($service)->willReturn(false);
208 208
             $this->services->expects($this->never())->method('get');
Please login to merge, or discard this patch.