Passed
Push — develop ( 24b5e4...fa8d1c )
by Carsten
07:00
created
module/Core/test/CoreTest/Factory/OptionsAbstractFactoryTest.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
         ];
55 55
 
56 56
         return [
57
-            [ [], 'testnameone', 'Test/Name.One', false ],
58
-            [ $cfg1, 'testnametwo', 'Test.Name/Two', true ],
59
-            [ $cfg1, 'othername', '', false ],
60
-            [ $cfg1, 'nonexistant', 'Non.Existant', false ],
57
+            [[], 'testnameone', 'Test/Name.One', false],
58
+            [$cfg1, 'testnametwo', 'Test.Name/Two', true],
59
+            [$cfg1, 'othername', '', false],
60
+            [$cfg1, 'nonexistant', 'Non.Existant', false],
61 61
         ];
62 62
     }
63 63
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $services = $this->getServiceLocatorMock($optionsConfig);
79 79
 
80
-        $method = "assert" . ($expected ? 'True' : 'False');
80
+        $method = "assert".($expected ? 'True' : 'False');
81 81
         $this->$method($target->canCreateServiceWithName($services, $name, $requestedName));
82 82
     }
83 83
 
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
         ];
90 90
 
91 91
         return [
92
-            [ [], 'Test/Name.One', false ],
93
-            [ $cfg1, 'Test.Name/Two', true ],
94
-            [ $cfg1, 'othername', true ],
95
-            [ $cfg1, 'Non.Existant', false ],
92
+            [[], 'Test/Name.One', false],
93
+            [$cfg1, 'Test.Name/Two', true],
94
+            [$cfg1, 'othername', true],
95
+            [$cfg1, 'Non.Existant', false],
96 96
         ];
97 97
     }
98 98
 
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
      * @param $requestedName
105 105
      * @param $expected
106 106
      */
107
-    public function testCanCreate($optionsConfig,$requestedName,$expected)
107
+    public function testCanCreate($optionsConfig, $requestedName, $expected)
108 108
     {
109 109
         $target = new OptionsAbstractFactory();
110 110
         $services = $this->getServiceLocatorMock($optionsConfig);
111 111
 
112 112
         $method = "assert".($expected ? 'True' : 'False');
113
-        $this->$method($target->canCreate($services,$requestedName));
113
+        $this->$method($target->canCreate($services, $requestedName));
114 114
     }
115 115
 
116 116
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $services = $this->getServiceLocatorMock([
144 144
             'TestOption' => [
145
-                'class' => __NAMESPACE__ . '\SimpleOptionsMock',
145
+                'class' => __NAMESPACE__.'\SimpleOptionsMock',
146 146
                 'mode' => 'invalid',
147 147
             ]
148 148
         ]);
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function testCreatesSimpleOptionsInstance()
160 160
     {
161
-        $optionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock';
161
+        $optionsMockClass = __NAMESPACE__.'\SimpleOptionsMock';
162 162
         $cfg = [
163 163
             'SimpleOptions' => [
164 164
                 'class' => $optionsMockClass,
165
-                'options' => [ 'one' => 'three' ]
165
+                'options' => ['one' => 'three']
166 166
             ]
167 167
         ];
168 168
 
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public function testCreateNestedOptionsInstance()
207 207
     {
208
-        $nestedOptionsMockClass = __NAMESPACE__ . '\NestedOptionsMock';
209
-        $simpleOptionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock';
208
+        $nestedOptionsMockClass = __NAMESPACE__.'\NestedOptionsMock';
209
+        $simpleOptionsMockClass = __NAMESPACE__.'\SimpleOptionsMock';
210 210
 
211 211
         $cfg = [
212 212
             'NestedOptions' => [
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
                 'mode' => OptionsAbstractFactory::MODE_NESTED,
215 215
                 'options' => [
216 216
                     'skalar' => 'itsworking',
217
-                    'array' => [ 'its' => 'working' ],
218
-                    'opt1' => [ '__class__' => $simpleOptionsMockClass ],
219
-                    'opt2' => [ '__class__' => $simpleOptionsMockClass, 'two' => 'four' ],
217
+                    'array' => ['its' => 'working'],
218
+                    'opt1' => ['__class__' => $simpleOptionsMockClass],
219
+                    'opt2' => ['__class__' => $simpleOptionsMockClass, 'two' => 'four'],
220 220
                 ],
221 221
             ],
222 222
         ];
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
 
231 231
         $this->assertInstanceOf($nestedOptionsMockClass, $options);
232 232
         $this->assertEquals('itsworking', $options->getSkalar());
233
-        $this->assertEquals([ 'its' => 'working' ], $options->getArray());
233
+        $this->assertEquals(['its' => 'working'], $options->getArray());
234 234
         $this->assertEquals('One', $options->getOpt1()->getOne());
235 235
         $this->assertEquals('four', $options->getOpt2()->getTwo());
236 236
     }
237 237
 
238 238
     protected function getServiceLocatorMock($optionsConfig = [])
239 239
     {
240
-        $optionsConfig = [ 'options' => $optionsConfig ];
240
+        $optionsConfig = ['options' => $optionsConfig];
241 241
         $services = $this->getMockBuilder('Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
242 242
 
243 243
         $services->expects($this->once())->method('get')->with('config')->willReturn($optionsConfig);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 class SimpleOptionsMock extends AbstractOptions
251 251
 {
252 252
     protected $one = "One";
253
-    protected $two= "Two";
253
+    protected $two = "Two";
254 254
 
255 255
     /**
256 256
      * @param string $one
Please login to merge, or discard this patch.
Core/test/CoreTest/Factory/Form/AbstractCustomizableFieldsetFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         ],
40 40
         '@testCreateServiceInvokesItselfAndResetsCreationOptions' => [
41 41
             'class' => AbstractCustomizableFieldsetFactory::class,
42
-            'mock' => [ '__invoke' ]
42
+            'mock' => ['__invoke']
43 43
         ],
44 44
         '@testInvokationThrowsExceptionIfOptionsNameIsNotSpecified' => [
45 45
             'class' => ConcreteAbstractCustomizableFieldsetFactoryWithClassName::class
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         ],
53 53
     ];
54 54
 
55
-    private $inheritance = [ FactoryInterface::class ];
55
+    private $inheritance = [FactoryInterface::class];
56 56
 
57 57
     public function testCreationOptions()
58 58
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/Form/Tree/SelectFactoryTest.php 1 patch
Spacing   +12 added lines, -12 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 = [ FactoryInterface::class];
52
+    private $inheritance = [FactoryInterface::class];
53 53
 
54 54
     public function testSetCreationOptions()
55 55
     {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $services = new ServiceManager();
68 68
         $forms    = new FormElementManagerV3Polyfill($services);
69 69
 
70
-        $options = [ 'test' => 'work?' ];
70
+        $options = ['test' => 'work?'];
71 71
         $this->target->setCreationOptions($options);
72 72
 
73 73
         $this->target
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
     public function provideMissingOptions()
85 85
     {
86 86
         return [
87
-            [ null ],
88
-            [ [] ],
89
-            [ ['tree' => ['value' => 'test']] ],
90
-            [ ['tree' => ['entity' => 'test']] ],
91
-            [ ['tree' => ['name' => 'test']] ],
87
+            [null],
88
+            [[]],
89
+            [['tree' => ['value' => 'test']]],
90
+            [['tree' => ['entity' => 'test']]],
91
+            [['tree' => ['name' => 'test']]],
92 92
         ];
93 93
     }
94 94
 
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
         $this->expectException(\RuntimeException::class);
121 121
         $this->expectExceptionMessage('Tree root not found');
122 122
 
123
-        $this->target->__invoke($services, '', ['tree' => [ 'entity' => 'testEntityRepository', 'value' => 'test']]);
123
+        $this->target->__invoke($services, '', ['tree' => ['entity' => 'testEntityRepository', 'value' => 'test']]);
124 124
     }
125 125
 
126
-    private function getServiceContainer($criteria, $root=null)
126
+    private function getServiceContainer($criteria, $root = null)
127 127
     {
128 128
         if (null === $root) { $root = new Node('Test'); }
129 129
         $repository = $this
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
         $root3 = $this->createRoot('root', ['child1' => ['gChild11', 'gChild12']]);
185 185
 
186 186
         return [
187
-            [ $root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]],
188
-            [ $root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]],
189
-            [ $root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]] ]
187
+            [$root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]],
188
+            [$root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]],
189
+            [$root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]
190 190
         ];
191 191
     }
192 192
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/View/Helper/AjaxUrlFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
      */
39 39
     private $target = [
40 40
         AjaxUrlFactory::class,
41
-        '@testCreateService' => [ 'mock' => ['__invoke']],
41
+        '@testCreateService' => ['mock' => ['__invoke']],
42 42
     ];
43 43
 
44
-    private $inheritance = [ FactoryInterface::class ];
44
+    private $inheritance = [FactoryInterface::class];
45 45
 
46 46
     public function testCreateService()
47 47
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/View/Helper/SocialButtonsFactoryTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@
 block discarded – undo
44 44
         $options = new ModuleOptions();
45 45
         $config = ['testwert'];
46 46
 
47
-        $HauptServiceLocator =  $this->getMockBuilder('Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
48
-        $HauptServiceLocator->expects($this->exactly(2))->method('get')->withConsecutive(['Auth/Options'],['Config'])->will($this->onConsecutiveCalls($options, $config));
47
+        $HauptServiceLocator = $this->getMockBuilder('Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
48
+        $HauptServiceLocator->expects($this->exactly(2))->method('get')->withConsecutive(['Auth/Options'], ['Config'])->will($this->onConsecutiveCalls($options, $config));
49 49
 
50 50
         $target = new SocialButtonsFactory();
51 51
 
52
-        $helper = $target($HauptServiceLocator,'irrelevant');
52
+        $helper = $target($HauptServiceLocator, 'irrelevant');
53 53
 
54
-        $this->assertInstanceOf("Core\View\Helper\SocialButtons",$helper);
55
-        $this->assertAttributeSame($options,'options',$helper);
56
-        $this->assertAttributeEquals($config,'config',$helper);
54
+        $this->assertInstanceOf("Core\View\Helper\SocialButtons", $helper);
55
+        $this->assertAttributeSame($options, 'options', $helper);
56
+        $this->assertAttributeEquals($config, 'config', $helper);
57 57
 
58 58
     }
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/View/Helper/SnippetFactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         '@testCreateService' => ['mock' => ['__invoke']],
43 43
     ];
44 44
 
45
-    private $inheritance = [ FactoryInterface::class ];
45
+    private $inheritance = [FactoryInterface::class];
46 46
 
47 47
 
48 48
     public function testCreateService()
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	    ]);
73 73
         $helpers = $this->createPluginManagerMock([
74 74
                 'partial' => ['service' => $partialHelper, 'count_get' => 1],
75
-            ],$container);
76
-        $container->setService('ViewHelperManager',$helpers);
75
+            ], $container);
76
+        $container->setService('ViewHelperManager', $helpers);
77 77
 
78 78
         $instance = $this->target->__invoke($container, Snippet::class);
79 79
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/Service/ImagineFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         '@testCreateService' => ['mock' => ['__invoke' => ['@with' => 'getInvokationMockArgs', 'count' => 1]]],
40 40
     ];
41 41
 
42
-    private $inheritance = [ FactoryInterface::class ];
42
+    private $inheritance = [FactoryInterface::class];
43 43
 
44 44
     private function getInvokationMockArgs()
45 45
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             }
88 88
         }
89 89
 
90
-        $this->fail('Imagine instance creation for ' .$lib . ' failed.');
90
+        $this->fail('Imagine instance creation for '.$lib.' failed.');
91 91
     }
92 92
 
93 93
 }
94 94
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/Listener/AjaxRouteListenerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         ],
43 43
     ];
44 44
 
45
-    private $inheritance = [ FactoryInterface::class ];
45
+    private $inheritance = [FactoryInterface::class];
46 46
 
47 47
     /**
48 48
      * @testdox Method createService() proxies to __invoke()
Please login to merge, or discard this patch.
Core/test/CoreTest/Factory/Listener/DeleteImageSetListenerFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         '@testCreateService' => ['mock' => ['__invoke' => ['@with' => 'getCreateServiceInvokationArgs', 'count' => 1]]],
38 38
     ];
39 39
 
40
-    private $inheritance = [ FactoryInterface::class ];
40
+    private $inheritance = [FactoryInterface::class];
41 41
 
42 42
     private function getCreateServiceInvokationArgs()
43 43
     {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         ];
58 58
 
59 59
         $container = $this->getServiceManagerMock();
60
-        $container->setService('repositories',$repositories);
60
+        $container->setService('repositories', $repositories);
61 61
         $container->setService('Config', $config);
62 62
 
63 63
         $listener = $this->target->__invoke($container, 'irrelevant');
Please login to merge, or discard this patch.