Completed
Push — develop ( 33eed9...a73e2c )
by Carsten
26s queued 21s
created
module/Core/test/CoreTest/Form/ContainerTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
     public function provideSetFormData()
135 135
     {
136 136
         return [
137
-            ['fieldname','input',true,true ],
138
-            ['fieldname', 'foobar', false, false ],
137
+            ['fieldname', 'input', true, true],
138
+            ['fieldname', 'foobar', false, false],
139 139
         ];
140 140
     }
141 141
 
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
 
193 193
 
194 194
         return [
195
-            [$e['application'], null , $e['application'] ],
196
-            [$e['job'], 'job' , $e['job'] ],
197
-            [$e['user'], null , $e['user'] ],
198
-            [$e['organization'], null , $e['organization'] ],
195
+            [$e['application'], null, $e['application']],
196
+            [$e['job'], 'job', $e['job']],
197
+            [$e['user'], null, $e['user']],
198
+            [$e['organization'], null, $e['organization']],
199 199
         ];
200 200
     }
201 201
     
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         $childName = 'child';
214 214
         $child = new Container($childName);
215 215
         $this->target->setForm($childName, $child);
216
-        $this->assertSame($childName .'.' . $name, $child->formatAction($name));
216
+        $this->assertSame($childName.'.'.$name, $child->formatAction($name));
217 217
     }
218 218
     
219 219
     public function testGetActionFor()
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/BaseFormTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
     protected function setUp()
27 27
     {
28 28
         $this->target = $this->getMockBuilder('Core\Form\BaseForm')
29
-                             ->disableOriginalConstructor()
30
-                             ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add'))
31
-                             ->getMock();
29
+                                ->disableOriginalConstructor()
30
+                                ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add'))
31
+                                ->getMock();
32 32
     }
33 33
 
34 34
     public function testConstructor()
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
@@ -36,41 +36,41 @@
 block discarded – undo
36 36
      */
37 37
     protected $target = '\Core\Form\Event\FormEvent';
38 38
 
39
-    protected $inheritance = [ '\Zend\EventManager\Event' ];
39
+    protected $inheritance = ['\Zend\EventManager\Event'];
40 40
 
41 41
     public function propertiesProvider()
42 42
     {
43 43
         $form = new Form();
44 44
         $container = new Container();
45 45
         return [
46
-            [ 'Form', '@\Zend\Form\Form' ],
47
-            [ 'Form', '@\Core\Form\Container' ],
48
-            [ 'Form', [ 'value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either' ] ] ],
49
-            [ 'Target', 'TestTarget' ],
50
-            [ 'Target', [
46
+            ['Form', '@\Zend\Form\Form'],
47
+            ['Form', '@\Core\Form\Container'],
48
+            ['Form', ['value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either']]],
49
+            ['Target', 'TestTarget'],
50
+            ['Target', [
51 51
                 'value' => $form,
52
-                'expect_property' => [ 'form', $form ]
52
+                'expect_property' => ['form', $form]
53 53
             ]],
54
-            [ 'Target', [
54
+            ['Target', [
55 55
                 'value' => $container,
56
-                'expect_property' => [ 'form', $container ],
56
+                'expect_property' => ['form', $container],
57 57
             ]],
58
-            [ 'Target', [
58
+            ['Target', [
59 59
                 'value' => 'NonFormOrContainer',
60
-                'expect_property' => [ 'form', null ],
60
+                'expect_property' => ['form', null],
61 61
             ]],
62
-            [ 'Params', [ 'value' => [ 'param1' => 'value1' ]]],
63
-            [ 'Params', [
64
-                'value' => [ 'form' => $form ],
65
-                'expect_property' => [ 'form', $form ]
62
+            ['Params', ['value' => ['param1' => 'value1']]],
63
+            ['Params', [
64
+                'value' => ['form' => $form],
65
+                'expect_property' => ['form', $form]
66 66
             ]],
67
-            [ 'Params', [
68
-                'value' => [ 'form' => $container ],
69
-                'expect_property' => [ 'form', $container ]
67
+            ['Params', [
68
+                'value' => ['form' => $container],
69
+                'expect_property' => ['form', $container]
70 70
             ]],
71
-            [ 'Params', [
72
-                'value' => [ 'form' => 'notAnFormInstance' ],
73
-                'expect_property' => [ 'form', null ]
71
+            ['Params', [
72
+                'value' => ['form' => 'notAnFormInstance'],
73
+                'expect_property' => ['form', null]
74 74
             ]]
75 75
         ];
76 76
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/SummaryFormButtonsFieldsetTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
 
43 43
     public function testSetGetFormId()
44 44
     {
45
-        $id=123;
45
+        $id = 123;
46 46
         $this->target->setFormId($id);
47
-        $this->assertSame($this->target->getFormId(), (string)$id);
47
+        $this->assertSame($this->target->getFormId(), (string) $id);
48 48
     }
49 49
 
50 50
     public function testSetAttribute()
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/SummaryFormTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     public function providerRenderMode()
53 53
     {
54 54
         return [
55
-            [SummaryFormInterface::RENDER_FORM,SummaryFormInterface::RENDER_FORM],
56
-            [SummaryFormInterface::RENDER_SUMMARY,SummaryFormInterface::RENDER_SUMMARY],
55
+            [SummaryFormInterface::RENDER_FORM, SummaryFormInterface::RENDER_FORM],
56
+            [SummaryFormInterface::RENDER_SUMMARY, SummaryFormInterface::RENDER_SUMMARY],
57 57
             [SummaryFormInterface::RENDER_ALL, SummaryFormInterface::RENDER_ALL],
58 58
         ];
59 59
     }
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
     public function providerDisplayMode()
76 76
     {
77 77
         return [
78
-            [SummaryFormInterface::DISPLAY_FORM,SummaryFormInterface::DISPLAY_FORM],
79
-            [SummaryFormInterface::DISPLAY_SUMMARY,SummaryFormInterface::DISPLAY_SUMMARY],
78
+            [SummaryFormInterface::DISPLAY_FORM, SummaryFormInterface::DISPLAY_FORM],
79
+            [SummaryFormInterface::DISPLAY_SUMMARY, SummaryFormInterface::DISPLAY_SUMMARY],
80 80
         ];
81 81
     }
82 82
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function testSetOptions($input, $expected)
96 96
     {
97
-        $this->target->setOptions(['display_mode' => $input ]);
97
+        $this->target->setOptions(['display_mode' => $input]);
98 98
         $this->assertSame($this->target->getDisplayMode(), $expected);
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/FormTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $fs->setName('myField');
32 32
         $target = new Form();
33 33
         $target->add($fs);
34
-        $this->target=$target;
34
+        $this->target = $target;
35 35
     }
36 36
 
37 37
     public function testConstructor()
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     public function testSetDescriptionWithAdditionalParams()
67 67
     {
68 68
         $input = "this is my description";
69
-        $this->target->setDescription($input, ['p1','p2']);
69
+        $this->target->setDescription($input, ['p1', 'p2']);
70 70
         $this->assertAttributeSame(['description' => $input,
71
-                                    'description_params' => ['p1','p2']], 'options', $this->target);
71
+                                    'description_params' => ['p1', 'p2']], 'options', $this->target);
72 72
     }
73 73
 
74 74
     public function testSetGetIsDisableCapable()
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $this->target->addClass($classes);
135 135
         }
136 136
 
137
-        $x=$this->target->getAttribute('class');
137
+        $x = $this->target->getAttribute('class');
138 138
         $this->assertEquals($x, $expected);
139 139
     }
140 140
 
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
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
         $this->formElementManagerMock->expects($this->never())->method('getServiceLocator');
86 86
         $instance = $this->getMockForAbstractClass('\Core\Form\HeadscriptProviderInterface');
87 87
         $instance->expects($this->exactly(2))
88
-                 ->method('getHeadscripts')
89
-                 ->will($this->onConsecutiveCalls('notanarray', array()));
88
+                    ->method('getHeadscripts')
89
+                    ->will($this->onConsecutiveCalls('notanarray', array()));
90 90
 
91 91
         $this->target->initialize($instance, $this->formElementManagerMock);
92 92
         $this->target->initialize($instance, $this->formElementManagerMock);
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
     public function testInjectsScriptsToTheHeadscriptViewHelper()
96 96
     {
97 97
         $basepath = $this->getMockBuilder('\Zend\View\Helper\BasePath')
98
-                         ->disableOriginalConstructor()->getMock();
98
+                            ->disableOriginalConstructor()->getMock();
99 99
 
100 100
         $basepath->expects($this->any())
101
-                 ->method('__invoke')->will($this->returnArgument(0));
101
+                    ->method('__invoke')->will($this->returnArgument(0));
102 102
 
103 103
 
104 104
         $headscript = $this->getMockBuilder('\Zend\View\Helper\HeadScript')
105
-                           ->disableOriginalConstructor()->getMock();
105
+                            ->disableOriginalConstructor()->getMock();
106 106
 
107 107
         $scripts = array('test/script.js', 'yetanother/test/script.tst');
108 108
 
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
         $this->instanceMock = $instance;
112 112
 
113 113
         $headscript->expects($this->exactly(2))
114
-                   ->method('__call')->withConsecutive(
115
-                       array('appendFile', array($scripts[0])),
116
-                       array('appendFile', array($scripts[1]))
114
+                    ->method('__call')->withConsecutive(
115
+                        array('appendFile', array($scripts[0])),
116
+                        array('appendFile', array($scripts[1]))
117 117
             );
118 118
 
119 119
         $helpers = $this->getMockBuilder('\Zend\View\HelperPluginManager')
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
         $services = $this->formElementManagerMock;
129 129
 
130 130
         $services->expects($this->exactly(1))
131
-                 ->method('get')
132
-                 ->with('ViewHelperManager')
133
-                 ->willReturn($helpers)
131
+                    ->method('get')
132
+                    ->with('ViewHelperManager')
133
+                    ->willReturn($helpers)
134 134
         ;
135 135
 
136 136
         $this->target->initialize($instance, $services);
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/Tree/AddItemFieldsetTest.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,19 +51,19 @@
 block discarded – undo
51 51
     {
52 52
         $mock = $this->getMockBuilder(AddItemFieldset::class)
53 53
             ->setMethods(['setObject', 'add'])
54
-             ->disableOriginalConstructor()->getMock();
54
+                ->disableOriginalConstructor()->getMock();
55 55
 
56 56
         $mock->expects($this->once())->method('setObject')->with($this->isInstanceOf(\ArrayObject::class));
57 57
 
58 58
         $mock->expects($this->exactly(6))->method('add')
59
-             ->withConsecutive(
60
-                 [['name' => 'id', 'type' => 'Hidden']],
61
-                 [['name' => 'current', 'type' => 'Hidden']],
62
-                 [['name' => 'do', 'type' => 'Hidden']],
63
-                 [['name' => 'name', 'type' => 'Text', 'options' => ['label' => 'Name'], 'attributes' => ['required' => 'required']]],
64
-                 [['name' => 'value', 'type' => 'Text', 'options' => ['label' => 'Value']]],
65
-                 [['name' => 'priority', 'type' => 'Text']]
66
-             );
59
+                ->withConsecutive(
60
+                    [['name' => 'id', 'type' => 'Hidden']],
61
+                    [['name' => 'current', 'type' => 'Hidden']],
62
+                    [['name' => 'do', 'type' => 'Hidden']],
63
+                    [['name' => 'name', 'type' => 'Text', 'options' => ['label' => 'Name'], 'attributes' => ['required' => 'required']]],
64
+                    [['name' => 'value', 'type' => 'Text', 'options' => ['label' => 'Value']]],
65
+                    [['name' => 'priority', 'type' => 'Text']]
66
+                );
67 67
 
68 68
         return $mock;
69 69
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/EmptySummaryAwareTraitTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,27 +32,27 @@
 block discarded – undo
32 32
     public function propertiesProvider()
33 33
     {
34 34
         return  [
35
-            [ 'summaryEmpty', [
35
+            ['summaryEmpty', [
36 36
                 'ignore_setter' => true,
37
-                'pre' => function () {
37
+                'pre' => function() {
38 38
                     $this->target->add(['name' => 'test', 'type' => 'text', 'attributes' => ['value'=>'test']]);
39 39
                 },
40 40
                 'value' => false,
41 41
                 'getter_method' => 'is*'
42 42
             ]],
43
-            [ 'summaryEmpty', [
43
+            ['summaryEmpty', [
44 44
                 'ignore_setter' => true,
45
-                'pre' => function () {
45
+                'pre' => function() {
46 46
                     $this->target->add(['name' => 'test', 'type' => 'text']);
47 47
                 },
48 48
                 'value' => true,
49 49
                 'getter_method' => 'is*',
50 50
             ]],
51
-            [ 'emptySummaryNotice', [
51
+            ['emptySummaryNotice', [
52 52
                 'value' => 'notice',
53 53
                 'default' => null
54 54
             ]],
55
-            [ 'emptySummaryNotice', [
55
+            ['emptySummaryNotice', [
56 56
                 'value' => 'notice',
57 57
                 'default' => 'defaultNotice',
58 58
             ]],
Please login to merge, or discard this patch.