Passed
Push — master ( 97bca0...c3d0da )
by Carsten
19:24 queued 12:32
created
module/Core/test/CoreTest/Form/Hydrator/MetaDataHydratorTest.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $expect = ['extract' => 'works'];
51 51
         $object = $this->getMockBuilder(MetaDataProviderInterface::class)
52
-                       ->setMethods(['getMetaData'])
53
-                       ->getMockForAbstractClass();
52
+                        ->setMethods(['getMetaData'])
53
+                        ->getMockForAbstractClass();
54 54
 
55 55
         $object->expects($this->once())->method('getMetaData')->willReturn($expect);
56 56
 
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
     public function testHydrationOfMetaDataProvider()
70 70
     {
71 71
         $object = $this->getMockBuilder(MetaDataProviderInterface::class)
72
-                       ->setMethods(['setMetaData'])
73
-                       ->getMockForAbstractClass();
72
+                        ->setMethods(['setMetaData'])
73
+                        ->getMockForAbstractClass();
74 74
 
75 75
         $object->expects($this->once())->method('setMetaData')->with('key', 'value');
76 76
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     private $target = MetaDataHydrator::class;
37 37
 
38
-    private $inheritance = [ HydratorInterface::class ];
38
+    private $inheritance = [HydratorInterface::class];
39 39
 
40 40
     public function testExtractionOfNonMetaDataProvider()
41 41
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/Hydrator/Strategy/TreeSelectStrategyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     private $target = 'getTarget';
42 42
 
43
-    private $inheritance = [ StrategyInterface::class ];
43
+    private $inheritance = [StrategyInterface::class];
44 44
 
45 45
     public function propertiesProvider()
46 46
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/BaseFormTest.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
 
24 24
     public function setUp(){
25 25
         $this->target = $this->getMockBuilder('Core\Form\BaseForm')
26
-                             ->disableOriginalConstructor()
27
-                             ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add'))
28
-                             ->getMock();
26
+                                ->disableOriginalConstructor()
27
+                                ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add'))
28
+                                ->getMock();
29 29
     }
30 30
 
31 31
     public function testConstructor()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 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 = $this->getMockBuilder('Core\Form\BaseForm')
26 26
                              ->disableOriginalConstructor()
27 27
                              ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add'))
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
      * @expectedException InvalidArgumentException
39 39
      * @expectedExceptionMessage For the Form Core\Form\BaseForm there is no Basefieldset
40 40
      */
41
-    public function testInitWithoutBaseForm(){
41
+    public function testInitWithoutBaseForm() {
42 42
         $target = new BaseForm;
43 43
         $target->init();
44 44
 
45 45
         $this->assertEquals($target, null);
46 46
     }
47 47
 
48
-    public function testAddBaseFieldsetWithoutBaseFieldsetSet(){
48
+    public function testAddBaseFieldsetWithoutBaseFieldsetSet() {
49 49
         /*@todo*/
50 50
     }
51 51
 }
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/CollectionContainerTest.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $this->collectionContainer->setEntity($collection);
100 100
         $iterator = $this->collectionContainer->getIterator();
101
-		$this->assertInstanceOf(\Iterator::class, $iterator);
102
-		$this->assertSame(count($collection), count($iterator));
101
+        $this->assertInstanceOf(\Iterator::class, $iterator);
102
+        $this->assertSame(count($collection), count($iterator));
103 103
     }
104 104
     
105 105
     /**
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
         $this->collectionContainer->setEntity($collection);
150 150
         $entry = $collection->first();
151 151
         $key = $collection->indexOf($entry);
152
-		$form = $this->collectionContainer->getForm($key);
153
-		$this->assertInstanceOf(CoreForm::class, $form);
154
-		$this->assertSame($entry, $form->getObject());
155
-		$this->assertContains($key, $form->getAttribute('action'));
152
+        $form = $this->collectionContainer->getForm($key);
153
+        $this->assertInstanceOf(CoreForm::class, $form);
154
+        $this->assertSame($entry, $form->getObject());
155
+        $this->assertContains($key, $form->getAttribute('action'));
156 156
     }
157 157
     
158 158
     /**
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
     {
163 163
         $this->collectionContainer->setEntity($collection);
164 164
         $form = $this->collectionContainer->getForm(CollectionContainer::NEW_ENTRY);
165
-		$this->assertInstanceOf(CoreForm::class, $form);
166
-		$this->assertSame($this->newEntry, $form->getObject());
167
-		$this->assertContains(CollectionContainer::NEW_ENTRY, $form->getAttribute('action'));
165
+        $this->assertInstanceOf(CoreForm::class, $form);
166
+        $this->assertSame($this->newEntry, $form->getObject());
167
+        $this->assertContains(CollectionContainer::NEW_ENTRY, $form->getAttribute('action'));
168 168
     }
169 169
     
170 170
     /**
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
         $entry = $collection->first();
186 186
         $count = count($collection);
187 187
         $result = $this->collectionContainer->executeAction('remove', ['key' => $collection->indexOf($entry)]);
188
-		$this->assertArrayHasKey('success', $result);
189
-		$this->assertTrue($result['success']);
190
-		$this->assertSame($count - 1, count($collection));
188
+        $this->assertArrayHasKey('success', $result);
189
+        $this->assertTrue($result['success']);
190
+        $this->assertSame($count - 1, count($collection));
191 191
     }
192 192
     
193 193
     /**
@@ -198,23 +198,23 @@  discard block
 block discarded – undo
198 198
         $this->collectionContainer->setEntity($collection);
199 199
         $count = count($collection);
200 200
         $result = $this->collectionContainer->executeAction('remove', ['key' => 'non-existent']);
201
-		$this->assertArrayHasKey('success', $result);
202
-		$this->assertFalse($result['success']);
203
-		$this->assertSame($count, count($collection));
201
+        $this->assertArrayHasKey('success', $result);
202
+        $this->assertFalse($result['success']);
203
+        $this->assertSame($count, count($collection));
204 204
     }
205 205
     
206 206
     public function testGetViewHelper()
207 207
     {
208
-		$result = $this->collectionContainer->getViewHelper();
209
-		$this->assertTrue(is_string($result));
210
-		$this->assertNotEmpty($result);
208
+        $result = $this->collectionContainer->getViewHelper();
209
+        $this->assertTrue(is_string($result));
210
+        $this->assertNotEmpty($result);
211 211
     }
212 212
     
213 213
     public function testSetViewHelper()
214 214
     {
215 215
         $expected = 'viewHelper';
216
-		$this->assertSame($this->collectionContainer, $this->collectionContainer->setViewHelper($expected));
217
-		$this->assertSame($expected, $this->collectionContainer->getViewHelper());
216
+        $this->assertSame($this->collectionContainer, $this->collectionContainer->setViewHelper($expected));
217
+        $this->assertSame($expected, $this->collectionContainer->getViewHelper());
218 218
     }
219 219
     
220 220
     /**
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/Event/FormEventTest.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -35,41 +35,41 @@
 block discarded – undo
35 35
      */
36 36
     protected $target = '\Core\Form\Event\FormEvent';
37 37
 
38
-    protected $inheritance = [ '\Zend\EventManager\Event' ];
38
+    protected $inheritance = ['\Zend\EventManager\Event'];
39 39
 
40 40
     public function  propertiesProvider()
41 41
     {
42 42
         $form = new Form();
43 43
         $container = new Container();
44 44
         return [
45
-            [ 'Form', '@\Zend\Form\Form' ],
46
-            [ 'Form', '@\Core\Form\Container' ],
47
-            [ 'Form', [ 'value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either' ] ] ],
48
-            [ 'Target', 'TestTarget' ],
49
-            [ 'Target', [
45
+            ['Form', '@\Zend\Form\Form'],
46
+            ['Form', '@\Core\Form\Container'],
47
+            ['Form', ['value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either']]],
48
+            ['Target', 'TestTarget'],
49
+            ['Target', [
50 50
                 'value' => $form,
51
-                'expect_property' => [ 'form', $form ]
51
+                'expect_property' => ['form', $form]
52 52
             ]],
53
-            [ 'Target', [
53
+            ['Target', [
54 54
                 'value' => $container,
55
-                'expect_property' => [ 'form', $container ],
55
+                'expect_property' => ['form', $container],
56 56
             ]],
57
-            [ 'Target', [
57
+            ['Target', [
58 58
                 'value' => 'NonFormOrContainer',
59
-                'expect_property' => [ 'form', null ],
59
+                'expect_property' => ['form', null],
60 60
             ]],
61
-            [ 'Params', [ 'value' => [ 'param1' => 'value1' ]]],
62
-            [ 'Params', [
63
-                'value' => [ 'form' => $form ],
64
-                'expect_property' => [ 'form', $form ]
61
+            ['Params', ['value' => ['param1' => 'value1']]],
62
+            ['Params', [
63
+                'value' => ['form' => $form],
64
+                'expect_property' => ['form', $form]
65 65
             ]],
66
-            [ 'Params', [
67
-                'value' => [ 'form' => $container ],
68
-                'expect_property' => [ 'form', $container ]
66
+            ['Params', [
67
+                'value' => ['form' => $container],
68
+                'expect_property' => ['form', $container]
69 69
             ]],
70
-            [ 'Params', [
71
-                'value' => [ 'form' => 'notAnFormInstance' ],
72
-                'expect_property' => [ 'form', null ]
70
+            ['Params', [
71
+                'value' => ['form' => 'notAnFormInstance'],
72
+                'expect_property' => ['form', null]
73 73
             ]]
74 74
         ];
75 75
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/ListeFilterButtonsFieldsetTest.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 ListFilterButtonsFieldset();
26 26
     }
27 27
 
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
     public function testInit()
35 35
     {
36 36
         $this->target->init();
37
-        $this->assertSame($this->target->getViewPartial(),'form/core/buttons');
38
-        $this->assertSame($this->target->getName(),'buttons');
39
-        $this->assertSame($this->target->count(),2);
40
-        $this->assertSame($this->target->isDisableCapable(),false);
37
+        $this->assertSame($this->target->getViewPartial(), 'form/core/buttons');
38
+        $this->assertSame($this->target->getName(), 'buttons');
39
+        $this->assertSame($this->target->count(), 2);
40
+        $this->assertSame($this->target->isDisableCapable(), false);
41 41
     }
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/View/Helper/FormFileUploadTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $this->assertInternalType('string', $result);
125 125
         $this->assertStringStartsWith('<input', $result);
126 126
         $this->assertContains('type="file"', $result);
127
-        $this->assertContains('name="' . $element->getName() . '"', $result);
127
+        $this->assertContains('name="'.$element->getName().'"', $result);
128 128
     }
129 129
     
130 130
     /**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $fileUploadHelper->expects($this->once())
222 222
             ->method('renderMarkup')
223 223
             ->with($this->equalTo($element))
224
-            ->willReturn($markupOutput . $fileElementPlaceholder);
224
+            ->willReturn($markupOutput.$fileElementPlaceholder);
225 225
         $fileUploadHelper->expects($this->once())
226 226
             ->method('renderFileElement')
227 227
             ->with($this->equalTo($element))
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/Service/InjectHeadscriptInitializerTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
         $this->formElementManagerMock->expects($this->never())->method('getServiceLocator');
84 84
         $instance = $this->getMockForAbstractClass('\Core\Form\HeadscriptProviderInterface');
85 85
         $instance->expects($this->exactly(2))
86
-                 ->method('getHeadscripts')
87
-                 ->will($this->onConsecutiveCalls('notanarray', array()));
86
+                    ->method('getHeadscripts')
87
+                    ->will($this->onConsecutiveCalls('notanarray', array()));
88 88
 
89 89
         $this->target->initialize($instance, $this->formElementManagerMock);
90 90
         $this->target->initialize($instance, $this->formElementManagerMock);
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
     public function testInjectsScriptsToTheHeadscriptViewHelper()
94 94
     {
95 95
         $basepath = $this->getMockBuilder('\Zend\View\Helper\BasePath')
96
-                         ->disableOriginalConstructor()->getMock();
96
+                            ->disableOriginalConstructor()->getMock();
97 97
 
98 98
         $basepath->expects($this->any())
99
-                 ->method('__invoke')->will($this->returnArgument(0));
99
+                    ->method('__invoke')->will($this->returnArgument(0));
100 100
 
101 101
 
102 102
         $headscript = $this->getMockBuilder('\Zend\View\Helper\HeadScript')
103
-                           ->disableOriginalConstructor()->getMock();
103
+                            ->disableOriginalConstructor()->getMock();
104 104
 
105 105
         $scripts = array('test/script.js', 'yetanother/test/script.tst');
106 106
 
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
         $this->instanceMock = $instance;
110 110
 
111 111
         $headscript->expects($this->exactly(2))
112
-                   ->method('__call')->withConsecutive(
113
-                   array('appendFile', array($scripts[0])),
114
-                   array('appendFile', array($scripts[1]))
112
+                    ->method('__call')->withConsecutive(
113
+                    array('appendFile', array($scripts[0])),
114
+                    array('appendFile', array($scripts[1]))
115 115
             );
116 116
 
117 117
         $helpers = $this->getMockBuilder('\Zend\View\HelperPluginManager')
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
         $services = $this->formElementManagerMock;
127 127
 
128 128
         $services->expects($this->exactly(1))
129
-                 ->method('get')
130
-                 ->with('ViewHelperManager')
131
-                 ->willReturn($helpers)
129
+                    ->method('get')
130
+                    ->with('ViewHelperManager')
131
+                    ->willReturn($helpers)
132 132
         ;
133 133
 
134 134
         $this->target->initialize($instance, $services);
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/WizardContainerTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $labeldContainer->setLabel('testLabel');
43 43
         $topContainer = new Container();
44 44
         $topContainer->setForm('child', [ '__instance__' => $object ])
45
-                     ->setLabel('top');
45
+                        ->setLabel('top');
46 46
 
47 47
         return [
48 48
             /*[ 'Headscripts', [
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $labeldContainer = new Container();
42 42
         $labeldContainer->setLabel('testLabel');
43 43
         $topContainer = new Container();
44
-        $topContainer->setForm('child', [ '__instance__' => $object ])
44
+        $topContainer->setForm('child', ['__instance__' => $object])
45 45
                      ->setLabel('top');
46 46
 
47 47
         return [
@@ -49,85 +49,85 @@  discard block
 block discarded – undo
49 49
                 'default' => [ '/assets/twitter-bootstrap-wizard/jquery.bootstrap.wizard.js' ],
50 50
                 'value'   => [ 'test/scripts' ],
51 51
             ]],*/
52
-            [ 'Form', [
52
+            ['Form', [
53 53
                 'value' => 'test',
54
-                'setter_args' => [ $object ],
55
-                'setter_exception' => [ '\InvalidArgumentException', 'Tab container must be of the type' ],
54
+                'setter_args' => [$object],
55
+                'setter_exception' => ['\InvalidArgumentException', 'Tab container must be of the type'],
56 56
             ]],
57
-            [ 'Form', [
57
+            ['Form', [
58 58
                 'value' => 'test',
59
-                'setter_args' => [ $container ],
60
-                'setter_exception' => [ '\InvalidArgumentException', 'Container instances must have a label' ],
59
+                'setter_args' => [$container],
60
+                'setter_exception' => ['\InvalidArgumentException', 'Container instances must have a label'],
61 61
             ]],
62
-            [ 'Form', [
62
+            ['Form', [
63 63
                 'value' => 'test',
64
-                'setter_args' => [ $labeldContainer ],
65
-                'getter_args' => [ 'test', true ],
64
+                'setter_args' => [$labeldContainer],
65
+                'getter_args' => ['test', true],
66 66
                 'expect' => $labeldContainer,
67 67
             ]],
68
-            [ 'Form', [
68
+            ['Form', [
69 69
                 'value' => 'test',
70
-                'setter_args' => [ 'Test/Container' ],
71
-                'getter_args' => [ 'test', /*asInstance*/ false ],
70
+                'setter_args' => ['Test/Container'],
71
+                'getter_args' => ['test', /*asInstance*/ false],
72 72
                 'expect' => [
73 73
                     'type' => 'Test/Container',
74 74
                     'name' => 'test',
75 75
                     'entity' => '*',
76 76
                 ],
77 77
             ]],
78
-            [ 'Form', [
78
+            ['Form', [
79 79
                 'value' => 'test',
80
-                'setter_args' => [ [ 'type' => 'Test/Container' ] ],
81
-                'getter_args' => [ 'test', false ],
80
+                'setter_args' => [['type' => 'Test/Container']],
81
+                'getter_args' => ['test', false],
82 82
                 'expect' => [
83 83
                     'type' => 'Test/Container',
84 84
                     'name' => 'test',
85 85
                     'entity' => '*',
86 86
                 ],
87 87
             ]],
88
-            [ 'Form', [
88
+            ['Form', [
89 89
                 'value' => 'test',
90
-                'setter_args' => [ [ ] ],
91
-                'getter_args' => [ 'test', false ],
90
+                'setter_args' => [[]],
91
+                'getter_args' => ['test', false],
92 92
                 'expect' => [
93 93
                     'type' => 'Core/Container',
94 94
                     'name' => 'test',
95 95
                     'entity' => '*',
96 96
                 ],
97 97
             ]],
98
-            [ 'Form', [
98
+            ['Form', [
99 99
                 'value' => 'test',
100
-                'setter_args' => [ [ 'forms' => [] ] ],
101
-                'getter_args' => [ 'test', false ],
100
+                'setter_args' => [['forms' => []]],
101
+                'getter_args' => ['test', false],
102 102
                 'expect' => [
103 103
                     'type' => 'Core/Container',
104 104
                     'name' => 'test',
105
-                    'options' => [ 'forms' => [] ],
105
+                    'options' => ['forms' => []],
106 106
                     'entity' => '*',
107 107
                 ]
108 108
             ]],
109
-            [ 'Form', [
109
+            ['Form', [
110 110
                 'value' => 'test',
111
-                'setter_args' => [ [ '__instance__' => $object ] ],
112
-                'getter_args' => [ 'test' ],
111
+                'setter_args' => [['__instance__' => $object]],
112
+                'getter_args' => ['test'],
113 113
                 'getter_exception' => '\UnexpectedValueException'
114 114
             ]],
115
-            [ 'Form', [
115
+            ['Form', [
116 116
                 'value' => 'test',
117
-                'setter_args' => [ [ '__instance__' => $container ] ],
118
-                'getter_args' => [ 'test' ],
117
+                'setter_args' => [['__instance__' => $container]],
118
+                'getter_args' => ['test'],
119 119
                 'getter_exception' => '\UnexpectedValueException'
120 120
             ]],
121
-            [ 'Form', [
121
+            ['Form', [
122 122
                 'value' => 'test',
123
-                'setter_args' => [ [ '__instance__' => $labeldContainer ] ],
124
-                'getter_args' => [ 'test' ],
123
+                'setter_args' => [['__instance__' => $labeldContainer]],
124
+                'getter_args' => ['test'],
125 125
                 'expect' => $labeldContainer
126 126
             ]],
127
-            [ 'Form', [
127
+            ['Form', [
128 128
                 'value' => 'test',
129
-                'setter_args' => [ [ '__instance__' => $topContainer ] ],
130
-                'getter_args' => [ 'test.child' ],
129
+                'setter_args' => [['__instance__' => $topContainer]],
130
+                'getter_args' => ['test.child'],
131 131
                 'expect' => $object
132 132
             ]],
133 133
 
Please login to merge, or discard this patch.