Completed
Pull Request — develop (#521)
by
unknown
15:37
created
module/Auth/test/AclTest/Assertion/AssertionManagerFactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                  ->willReturn(array());
39 39
 
40 40
         $target = new AssertionManagerFactory();
41
-        $manager = $target->__invoke($services,AssertionManager::class);
41
+        $manager = $target->__invoke($services, AssertionManager::class);
42 42
 
43 43
         $this->assertInstanceOf('\Acl\Assertion\AssertionManager', $manager);
44 44
         //$this->assertFalse($manager->shareByDefault(), 'The managers\' shareByDefault value must be set to FALSE by the factory.');
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 
62 62
         $target = new AssertionManagerFactory();
63 63
 
64
-        $manager = $target->__invoke($services,AssertionManager::class);
64
+        $manager = $target->__invoke($services, AssertionManager::class);
65 65
 
66
-        $this->assertTrue($testResult === $manager->has($testName), 'Expected managers\' has method to return ' . ($testResult ? 'TRUE' : 'FALSE') . ' on ' .$testName);
66
+        $this->assertTrue($testResult === $manager->has($testName), 'Expected managers\' has method to return '.($testResult ? 'TRUE' : 'FALSE').' on '.$testName);
67 67
     }
68 68
 
69 69
     public function provideConfigArrays()
Please login to merge, or discard this patch.
Auth/test/AuthTest/Factory/Controller/RemoveControllerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,6 +49,6 @@
 block discarded – undo
49 49
             ]));
50 50
         
51 51
         $controllerFactory = new RemoveControllerFactory();
52
-        $this->assertInstanceOf(RemoveController::class, $controllerFactory($serviceLocator,'irrelevant'));
52
+        $this->assertInstanceOf(RemoveController::class, $controllerFactory($serviceLocator, 'irrelevant'));
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
Auth/test/AuthTest/Factory/Controller/Plugin/UserSwitcherFactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
     private $target = [
40 40
         UserSwitcherFactory::class,
41 41
         '@testCreateServiceInvokesItself' => [
42
-            'mock' => [ '__invoke' ],
42
+            'mock' => ['__invoke'],
43 43
         ],
44 44
     ];
45 45
 
46
-    private $inheritance = [ FactoryInterface::class ];
46
+    private $inheritance = [FactoryInterface::class];
47 47
 
48 48
     public function testCreateServiceInvokesItself()
49 49
     {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $auth = $this->getMockBuilder(AuthenticationService::class)->disableOriginalConstructor()->getMock();
64 64
         $acl = $this->getMockBuilder(Acl::class)->disableOriginalConstructor()->getMock();
65 65
         $sm = $this->createServiceManagerMock();
66
-        $controllerPlugins = $this->getPluginManagerMock(['Acl' => ['service' => $acl, 'count_get' => 1]],$sm);
66
+        $controllerPlugins = $this->getPluginManagerMock(['Acl' => ['service' => $acl, 'count_get' => 1]], $sm);
67 67
         $container = $this->getServiceManagerMock([
68 68
                 'AuthenticationService' => ['service' => $auth, 'count_get' => 1],
69 69
                 'ControllerPluginManager' => ['service' => $controllerPlugins, 'count_get' => 1]
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Factory/View/Helper/AuthFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         
27 27
         $hm = new HelperPluginManager($sm);
28 28
         
29
-        $helper = $f->__invoke($sm,Auth::class);
29
+        $helper = $f->__invoke($sm, Auth::class);
30 30
         
31 31
         $this->assertInstanceOf('\Auth\View\Helper\Auth', $helper);
32 32
         $this->assertSame($auth, $helper->getService());
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Controller/ManageControllerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 			->disableOriginalConstructor()
36 36
 			->getMock()
37 37
 		;
38
-		$this->setMockToServiceLocator('HybridAuthAdapter',$this->hybridAuthAdapter);
38
+		$this->setMockToServiceLocator('HybridAuthAdapter', $this->hybridAuthAdapter);
39 39
 	}
40 40
 	
41 41
 	public function testAccessWhenNotLoggedIn()
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	public function testAccessWhenLoggedIn()
53 53
 	{
54 54
 		$this->authenticateUser();
55
-		$this->dispatch(self::URL_MY_PROFILE,Request::METHOD_GET);
55
+		$this->dispatch(self::URL_MY_PROFILE, Request::METHOD_GET);
56 56
 		$result = $this->getResponse()->getContent();
57 57
 		$this->assertNotRedirect();
58 58
 		$this->assertResponseStatusCode(Response::STATUS_CODE_200);
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Controller/RegisterControllerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $postData = array(
136 136
             'name' => uniqid('name'),
137
-            'email' => uniqid('email') . '@' . uniqid('host') . '.com.pl'
137
+            'email' => uniqid('email').'@'.uniqid('host').'.com.pl'
138 138
         );
139 139
 
140 140
         $request = new Request();
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         $postData = array(
183 183
             'name' => uniqid('name'),
184
-            'email' => uniqid('email') . '@' . uniqid('host') . '.com.pl'
184
+            'email' => uniqid('email').'@'.uniqid('host').'.com.pl'
185 185
         );
186 186
 
187 187
         $request = new Request();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     {
229 229
         $postData = array(
230 230
             'name' => uniqid('name'),
231
-            'email' => uniqid('email') . '@' . uniqid('host') . '.com.pl'
231
+            'email' => uniqid('email').'@'.uniqid('host').'.com.pl'
232 232
         );
233 233
 
234 234
         $request = new Request();
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Controller/Plugin/UserSwitcherTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
     private $target = [
44 44
         UserSwitcher::class,
45 45
         'getSimpleAuthMock',
46
-        '@testInheritance' => [ 'as_reflection' => true ],
46
+        '@testInheritance' => ['as_reflection' => true],
47 47
         '@testInvokationProxiesToCorrectMethods' => [
48 48
             'args' => false,
49
-            'mock' => [ 'clear' => 1, 'switchUser' => ['with' => 'testUserId', 'count' => 1]],
49
+            'mock' => ['clear' => 1, 'switchUser' => ['with' => 'testUserId', 'count' => 1]],
50 50
         ],
51 51
         '@testClearRestoresOriginalUserAndClearsSession' => [
52 52
             'args' => 'getComplexAuthMock',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         ],
63 63
     ];
64 64
 
65
-    private $inheritance = [ AbstractPlugin::class ];
65
+    private $inheritance = [AbstractPlugin::class];
66 66
 
67 67
     public function propertiesProvider()
68 68
     {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             ->disableOriginalConstructor()
108 108
             ->getMock();
109 109
 
110
-        return [ $auth ];
110
+        return [$auth];
111 111
     }
112 112
 
113 113
     private function getComplexAuthMock()
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         $auth->expects($this->any())->method('getUser')->willReturn(new User());
134 134
 
135
-        return [ $auth ];
135
+        return [$auth];
136 136
     }
137 137
 
138 138
     public function testInvokationProxiesToCorrectMethods()
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public function returnReferenceProvider()
150 150
     {
151 151
         return [
152
-            [ null ], [ 'some/ref/uri' ],
152
+            [null], ['some/ref/uri'],
153 153
         ];
154 154
     }
155 155
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $session = new Container(UserSwitcher::SESSION_NAMESPACE);
164 164
         $session->isSwitchedUser = true;
165 165
         $session->originalUser = 'switchedUser';
166
-        $oldSession      = [
166
+        $oldSession = [
167 167
             'oldSession' => true,
168 168
             'must'       => 'be same'
169 169
         ];
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Controller/PasswordControllerFunctionalTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function setUp()
23 23
     {
24
-        $logDir = __DIR__ . '/../../../../../log/';
25
-        $errorLogFile = $logDir . 'error.log';
26
-        $yawikLogFile = $logDir . 'yawik.log';
24
+        $logDir = __DIR__.'/../../../../../log/';
25
+        $errorLogFile = $logDir.'error.log';
26
+        $yawikLogFile = $logDir.'yawik.log';
27 27
 
28 28
         if ((file_exists($errorLogFile) && !is_writable($errorLogFile))
29 29
             || (file_exists($yawikLogFile) && !is_writable($yawikLogFile))
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             ->getMock();
40 40
         $this->repositoriesMock->expects($this->any())->method('get')
41 41
             ->will($this->returnValueMap([
42
-                [ 'Organizations/OrganizationImage', $orgImageRepo ]
42
+                ['Organizations/OrganizationImage', $orgImageRepo]
43 43
             ]));
44 44
 	    
45 45
         $manager = $this->getMockBuilder(Manager::class)
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	    ;
49 49
         $hybridAuth = $this->getMockBuilder(\Hybrid_Auth::class)->disableOriginalConstructor()->getMock();
50 50
         $this->setMockToServiceLocator('repositories', $this->repositoriesMock);
51
-        $this->setMockToServiceLocator('Organizations\ImageFileCache\Manager',$manager);
51
+        $this->setMockToServiceLocator('Organizations\ImageFileCache\Manager', $manager);
52 52
         $this->setMockToServiceLocator('HybridAuth', $hybridAuth);
53 53
     }
54 54
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	public function assertResponseStatusCode($code)
102 102
 	{
103 103
 		if ($this->useConsoleRequest) {
104
-			if (! in_array($code, [0, 1])) {
104
+			if (!in_array($code, [0, 1])) {
105 105
 				throw new \PHPUnit_Framework_ExpectationFailedException($this->createFailureMessage(
106 106
 					'Console status code assert value must be O (valid) or 1 (error)'
107 107
 				));
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Entity/InfoTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -242,10 +242,10 @@
 block discarded – undo
242 242
     public function provideGetDisplayNameTestData()
243 243
     {
244 244
         return array(
245
-            array(null,        null,      "[email protected]", "[email protected]"),
245
+            array(null, null, "[email protected]", "[email protected]"),
246 246
             array(" Carsten ", " Bleek ", "[email protected]", "Carsten Bleek"),
247
-            array(null,        " Bleek ", "[email protected]", "Bleek"),
248
-            array(" Carsten ", null,      "[email protected]", "[email protected]"),
247
+            array(null, " Bleek ", "[email protected]", "Bleek"),
248
+            array(" Carsten ", null, "[email protected]", "[email protected]"),
249 249
         );
250 250
     }
251 251
 
Please login to merge, or discard this patch.