Completed
Pull Request — master (#524)
by Mathias
11:33
created
Organizations/test/OrganizationsTest/Entity/OrganizationReferenceTest.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
     public function testOrganizationReferenceImplementsInterfaces()
42 42
     {
43 43
         $target = $this->getMockBuilder('\Organizations\Entity\OrganizationReference')
44
-                       ->disableOriginalConstructor()
45
-                       ->getMock();
44
+                        ->disableOriginalConstructor()
45
+                        ->getMock();
46 46
 
47 47
         $this->assertInstanceOf('\Organizations\Entity\OrganizationReferenceInterface', $target);
48 48
         $this->assertInstanceOf('\Organizations\Entity\OrganizationInterface', $target);
@@ -59,21 +59,21 @@  discard block
 block discarded – undo
59 59
             $organization = new Organization();
60 60
 
61 61
             $repository = $this->getMockBuilder('\Organizations\Repository\Organization')
62
-                               ->disableOriginalConstructor()->getMock();
62
+                                ->disableOriginalConstructor()->getMock();
63 63
 
64 64
             $repository->expects($this->once())
65
-                       ->method('findByUser')
66
-                       ->with('1234')
67
-                       ->willReturn('owner' == $type ? $organization : null);
65
+                        ->method('findByUser')
66
+                        ->with('1234')
67
+                        ->willReturn('owner' == $type ? $organization : null);
68 68
 
69 69
             if ('owner' == $type) {
70 70
                 $repository->expects($this->never())
71
-                           ->method('findByEmployee');
71
+                            ->method('findByEmployee');
72 72
             } else {
73 73
                 $repository->expects($this->once())
74
-                           ->method('findByEmployee')
75
-                           ->with('1234')
76
-                           ->willReturn('employee' == $type ? $organization : null);
74
+                            ->method('findByEmployee')
75
+                            ->with('1234')
76
+                            ->willReturn('employee' == $type ? $organization : null);
77 77
             }
78 78
 
79 79
             $target = new OrganizationReference('1234', $repository);
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
             [['setEmployees', 'getEmployees'], [[$emps], []], ['__self__', $emps]],
197 197
             ['getEmployee', ['4321'], null],
198 198
             [['setUser', 'getUser', 'getPermissionsUserIds'],
199
-                  [[$user], [], []],
200
-                  ['__self__', $user, [PermissionsInterface::PERMISSION_ALL => [$user->getId()]]]
199
+                    [[$user], [], []],
200
+                    ['__self__', $user, [PermissionsInterface::PERMISSION_ALL => [$user->getId()]]]
201 201
             ],
202 202
             ['getJobs', [], null],
203 203
             [['setPermissions', 'getPermissions'], [[$perms], []], ['__self__', $perms]],
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $args = array($args);
115 115
         }
116 116
 
117
-        for ($i=0,$c=count($func); $i<$c; $i+=1) {
117
+        for ($i = 0, $c = count($func); $i < $c; $i += 1) {
118 118
             $f = $func[$i];
119 119
             $a = $args[$i];
120 120
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             $func = array($func); $args = array($args); $expected = array($expected);
142 142
         }
143 143
 
144
-        for ($i=0, $c=count($func); $i<$c; $i+=1) {
144
+        for ($i = 0, $c = count($func); $i < $c; $i += 1) {
145 145
             $f = $func[$i];
146 146
             $a = $args[$i];
147 147
             $e = $expected[$i];
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $perms = new Permissions();
172 172
         $contact = new OrganizationContact();
173 173
         $image = new OrganizationImage();
174
-        $externalId='myReference';
174
+        $externalId = 'myReference';
175 175
         $template = new Template();
176 176
         $template->setLabelBenefits('These are your Benefits');
177 177
         $workflowSettings = new WorkflowSettings();
Please login to merge, or discard this patch.
Organizations/test/OrganizationsTest/Entity/OrganizationImageTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
     public function testGetResourceId()
51 51
     {
52
-       $this->assertSame($this->target->getResourceId(), 'Entity/OrganizationImage');
52
+        $this->assertSame($this->target->getResourceId(), 'Entity/OrganizationImage');
53 53
     }
54 54
 
55 55
     public function testGetUriWithAndWithoutFilename()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,14 +54,14 @@
 block discarded – undo
54 54
 
55 55
     public function testGetUriWithAndWithoutFilename()
56 56
     {
57
-        $filename="My File.png";
57
+        $filename = "My File.png";
58 58
         $this->target->setName($filename);
59 59
         $this->assertSame($this->target->getUri(), '/file/Organizations.OrganizationImage/'.$this->target->getId().'/'.urlencode($this->target->getName()));
60 60
         $this->target->setName(null);
61 61
         $this->assertSame($this->target->getUri(), '/file/Organizations.OrganizationImage/'.$this->target->getId());
62 62
     }
63 63
 
64
-    public function testSetGetOrganization(){
64
+    public function testSetGetOrganization() {
65 65
         $organization = new Organization();
66 66
         $this->target->setOrganization($organization);
67 67
         $this->assertSame($this->target->getOrganization(), $organization);
Please login to merge, or discard this patch.
test/OrganizationsTest/Form/OrganizationDescriptionFieldsetTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     protected $target;
31 31
 
32
-    public function setUp(){
32
+    public function setUp() {
33 33
         $this->target = new OrganizationsDescriptionFieldset();
34 34
         $this->target->init();
35 35
     }
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
         $this->assertInstanceOf('Zend\Form\Fieldset', $this->target);
40 40
     }
41 41
 
42
-    public function testNameFormFields(){
43
-        $this->assertSame($this->target->getName(),"organization-description");
42
+    public function testNameFormFields() {
43
+        $this->assertSame($this->target->getName(), "organization-description");
44 44
         $this->assertTrue($this->target->has('description'));
45 45
     }
46 46
 
47
-    public function testGetInputFilterSpec(){
48
-        $this->assertSame($this->target->getInputFilterSpecification(),[]);
47
+    public function testGetInputFilterSpec() {
48
+        $this->assertSame($this->target->getInputFilterSpecification(), []);
49 49
     }
50 50
 
51
-    public function testGetHydrator(){
51
+    public function testGetHydrator() {
52 52
         $this->assertEquals($this->target->getHydrator(), new EntityHydrator());
53 53
     }
54 54
 
Please login to merge, or discard this patch.
module/Organizations/test/OrganizationsTest/Form/EmployeesFieldsetTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@
 block discarded – undo
86 86
                 ->getMock();
87 87
 
88 88
         $target->expects($this->exactly(2))
89
-               ->method('add')
90
-               ->withConsecutive(
89
+                ->method('add')
90
+                ->withConsecutive(
91 91
                     array($expectAdd1),
92 92
                     array($expectAdd2)
93
-               );
93
+                );
94 94
 
95 95
         $target->init();
96 96
         $this->assertEquals('employees', $target->getName());
Please login to merge, or discard this patch.
module/Organizations/test/OrganizationsTest/Form/OrganizationTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@
 block discarded – undo
36 36
         $this->assertInstanceOf('Organizations\Form\Organizations', $this->target);
37 37
     }
38 38
 
39
-    public function testName(){
40
-        $this->assertSame($this->target->getName(),'organization-form');
39
+    public function testName() {
40
+        $this->assertSame($this->target->getName(), 'organization-form');
41 41
     }
42 42
 
43 43
     public function testNumberOfField() {
44
-        $this->assertSame($this->target->count(),7);
44
+        $this->assertSame($this->target->count(), 7);
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
test/OrganizationsTest/Form/OrganizationsProfileFieldsetTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function testNameFormFields()
38 38
     {
39
-        $this->assertEquals('profile-setting',$this->target->getName());
39
+        $this->assertEquals('profile-setting', $this->target->getName());
40 40
         $this->assertTrue($this->target->has('profileSetting'));
41 41
     }
42 42
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $this->assertTrue($this->target->allowObjectBinding(new Organization()));
51 51
     }
52 52
 
53
-    public function testGetHydrator(){
53
+    public function testGetHydrator() {
54 54
         $this->assertEquals($this->target->getHydrator(), new EntityHydrator());
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
module/Organizations/test/OrganizationsTest/Form/EmployeeFieldsetTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,15 +102,15 @@
 block discarded – undo
102 102
                 ->getMock();
103 103
 
104 104
         $target->expects($this->exactly(4))
105
-               ->method('add')
106
-               ->withConsecutive(
105
+                ->method('add')
106
+                ->withConsecutive(
107 107
                     array($expectAdd1),
108 108
                     array($expectAdd2),
109 109
                     array($expectAdd3),
110 110
                     array($expectAdd4)
111 111
 
112 112
 
113
-               );
113
+                );
114 114
 
115 115
         $target->init();
116 116
     }
Please login to merge, or discard this patch.
test/OrganizationsTest/Form/OrganizationContactFieldsetTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected $target;
32 32
 
33
-    public function setUp(){
33
+    public function setUp() {
34 34
         $this->target = new OrganizationsContactFieldset();
35 35
         $this->target->init();
36 36
     }
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
         $this->assertInstanceOf('Zend\Form\Fieldset', $this->target);
41 41
     }
42 42
 
43
-    public function testNameFormFields(){
44
-        $this->assertSame($this->target->getName(),"contact");
43
+    public function testNameFormFields() {
44
+        $this->assertSame($this->target->getName(), "contact");
45 45
         $this->assertTrue($this->target->has('fax'));
46 46
         $this->assertTrue($this->target->has('phone'));
47 47
         $this->assertTrue($this->target->has('city'));
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
         $this->assertTrue($this->target->has('street'));
51 51
     }
52 52
 
53
-    public function testAllowObjectBinding(){
54
-        $this->assertSame($this->target->allowObjectBinding(new OrganizationContact),true);
53
+    public function testAllowObjectBinding() {
54
+        $this->assertSame($this->target->allowObjectBinding(new OrganizationContact), true);
55 55
     }
56 56
 
57
-    public function testGetInputFilterSpec(){
58
-        $this->assertSame($this->target->getInputFilterSpecification(),[]);
57
+    public function testGetInputFilterSpec() {
58
+        $this->assertSame($this->target->getInputFilterSpecification(), []);
59 59
     }
60 60
 
61
-    public function testGetHydrator(){
61
+    public function testGetHydrator() {
62 62
         $this->assertEquals($this->target->getHydrator(), new EntityHydrator());
63 63
     }
64 64
 
Please login to merge, or discard this patch.
test/OrganizationsTest/Paginator/ListJobPaginatorFactoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $container->expects($this->any())
40 40
             ->method('get')
41 41
             ->willReturnMap([
42
-                ['FilterManager',$filterManager],
43
-                ['repositories',$repositories]
42
+                ['FilterManager', $filterManager],
43
+                ['repositories', $repositories]
44 44
             ])
45 45
         ;
46 46
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
         ;
61 61
 
62 62
         $target = new ListJobPaginatorFactory();
63
-        $service = $target($container,'some-name',array());
63
+        $service = $target($container, 'some-name', array());
64 64
 
65
-        $this->assertInstanceOf(Paginator::class,$service);
65
+        $this->assertInstanceOf(Paginator::class, $service);
66 66
     }
67 67
 }
Please login to merge, or discard this patch.