@@ -38,7 +38,7 @@ discard block |
||
| 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 |
||
| 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() |
@@ -49,6 +49,6 @@ |
||
| 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 | } |
@@ -39,11 +39,11 @@ discard block |
||
| 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 |
||
| 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] |
@@ -26,7 +26,7 @@ |
||
| 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()); |
@@ -35,7 +35,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -134,7 +134,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -43,10 +43,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | ]; |
@@ -21,9 +21,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | )); |
@@ -242,10 +242,10 @@ |
||
| 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 | |