@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | |
24 | 24 | protected function setUp() |
25 | 25 | { |
26 | - $logDir = __DIR__ . '/../../../../../log/'; |
|
27 | - $errorLogFile = $logDir . 'error.log'; |
|
28 | - $yawikLogFile = $logDir . 'yawik.log'; |
|
26 | + $logDir = __DIR__.'/../../../../../log/'; |
|
27 | + $errorLogFile = $logDir.'error.log'; |
|
28 | + $yawikLogFile = $logDir.'yawik.log'; |
|
29 | 29 | |
30 | 30 | if ((file_exists($errorLogFile) && !is_writable($errorLogFile)) |
31 | 31 | || (file_exists($yawikLogFile) && !is_writable($yawikLogFile)) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ->getMock(); |
42 | 42 | $this->repositoriesMock->expects($this->any())->method('get') |
43 | 43 | ->will($this->returnValueMap([ |
44 | - [ 'Organizations/OrganizationImage', $orgImageRepo ] |
|
44 | + ['Organizations/OrganizationImage', $orgImageRepo] |
|
45 | 45 | ])); |
46 | 46 | |
47 | 47 | $manager = $this->getMockBuilder(Manager::class) |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | public function assertResponseStatusCode($code) |
104 | 104 | { |
105 | 105 | if ($this->useConsoleRequest) { |
106 | - if (! in_array($code, [0, 1])) { |
|
106 | + if (!in_array($code, [0, 1])) { |
|
107 | 107 | throw new \PHPUnit_Framework_ExpectationFailedException($this->createFailureMessage( |
108 | 108 | 'Console status code assert value must be O (valid) or 1 (error)' |
109 | 109 | )); |
@@ -19,7 +19,6 @@ |
||
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Class ManageControllerTest |
22 | - |
|
23 | 22 | * @package AuthTest\Controller |
24 | 23 | */ |
25 | 24 | class ManageControllerTest extends AbstractFunctionalControllerTestCase |
@@ -41,11 +41,11 @@ |
||
41 | 41 | private $target = [ |
42 | 42 | UserSwitcherFactory::class, |
43 | 43 | '@testCreateServiceInvokesItself' => [ |
44 | - 'mock' => [ '__invoke' ], |
|
44 | + 'mock' => ['__invoke'], |
|
45 | 45 | ], |
46 | 46 | ]; |
47 | 47 | |
48 | - private $inheritance = [ FactoryInterface::class ]; |
|
48 | + private $inheritance = [FactoryInterface::class]; |
|
49 | 49 | |
50 | 50 | public function testCreateServiceInvokesItself() |
51 | 51 | { |
@@ -45,22 +45,22 @@ |
||
45 | 45 | |
46 | 46 | |
47 | 47 | $callback = $this->getMockBuilder('\Zend\Stdlib\CallbackHandler') |
48 | - ->disableOriginalConstructor() |
|
49 | - ->getMock(); |
|
48 | + ->disableOriginalConstructor() |
|
49 | + ->getMock(); |
|
50 | 50 | |
51 | 51 | $events = $this->getMockBuilder('\Zend\EventManager\SharedEventManagerInterface') |
52 | - ->setMethods(array('attach')) |
|
53 | - ->getMockForAbstractClass(); |
|
52 | + ->setMethods(array('attach')) |
|
53 | + ->getMockForAbstractClass(); |
|
54 | 54 | |
55 | 55 | $events->expects($this->once()) |
56 | - ->method('attach') |
|
57 | - ->with($expId, $expEvent, $expCallback, $expPriority) |
|
58 | - ->willReturn($expCallback); |
|
56 | + ->method('attach') |
|
57 | + ->with($expId, $expEvent, $expCallback, $expPriority) |
|
58 | + ->willReturn($expCallback); |
|
59 | 59 | |
60 | 60 | $events->expects($this->once()) |
61 | - ->method('detach') |
|
62 | - ->with($expCallback, 'Zend\Mvc\Application') |
|
63 | - ->willReturn(true); |
|
61 | + ->method('detach') |
|
62 | + ->with($expCallback, 'Zend\Mvc\Application') |
|
63 | + ->willReturn(true); |
|
64 | 64 | |
65 | 65 | |
66 | 66 | $target->attachShared($events); |
@@ -129,7 +129,7 @@ |
||
129 | 129 | [$this->equalTo(MvcEvent::EVENT_DISPATCH_ERROR), $this->identicalTo([$this->listener, 'prepareExceptionViewModel'], $this->identicalTo(null))], |
130 | 130 | [$this->equalTo(MvcEvent::EVENT_RENDER_ERROR), $this->identicalTo([$this->listener, 'prepareExceptionViewModel'], $this->identicalTo(null))], |
131 | 131 | [$this->equalTo(MvcEvent::EVENT_ROUTE), $this->identicalTo([$this->listener, 'checkDeactivatedUser'], $this->identicalTo(null))] |
132 | - ); |
|
132 | + ); |
|
133 | 133 | |
134 | 134 | $this->listener->attach($eventManager); |
135 | 135 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | ->getMock(); |
84 | 84 | $this->serviceManager->expects($this->any()) |
85 | 85 | ->method('get') |
86 | - ->will($this->returnCallback(function ($name) { |
|
86 | + ->will($this->returnCallback(function($name) { |
|
87 | 87 | switch ($name) { |
88 | 88 | case 'AuthenticationService': |
89 | 89 | return $this->auth; |
@@ -83,20 +83,20 @@ discard block |
||
83 | 83 | $options = new CaptchaOptions(); |
84 | 84 | $options->setMode("reCaptcha"); |
85 | 85 | $testedObject = new Register(null, $options); |
86 | - $captchaInput= $testedObject->get('captcha'); |
|
86 | + $captchaInput = $testedObject->get('captcha'); |
|
87 | 87 | $this->assertInstanceOf('Zend\Form\Element\Captcha', $captchaInput); |
88 | 88 | $this->assertInstanceOf('Zend\Captcha\ReCaptcha', $captchaInput->getOption('captcha')); |
89 | 89 | } |
90 | 90 | |
91 | 91 | public function testWithImageField() |
92 | 92 | { |
93 | - if (! function_exists("imageftbbox")) { |
|
93 | + if (!function_exists("imageftbbox")) { |
|
94 | 94 | return $this->markTestSkipped('This test requires GD FT fonts support'); |
95 | 95 | } |
96 | 96 | $options = new CaptchaOptions(); |
97 | 97 | $options->setMode("image"); |
98 | 98 | $testedObject = new Register(null, $options); |
99 | - $captchaInput= $testedObject->get('captcha'); |
|
99 | + $captchaInput = $testedObject->get('captcha'); |
|
100 | 100 | $this->assertInstanceOf('Zend\Captcha\Image', $captchaInput->getOption('captcha')); |
101 | 101 | } |
102 | 102 | |
@@ -105,6 +105,6 @@ discard block |
||
105 | 105 | $options = new CaptchaOptions(); |
106 | 106 | $testedObject = new Register(null, $options, 'user'); |
107 | 107 | $roleField = $testedObject->get('register')->get('role'); |
108 | - $this->assertTrue($roleField->getValue() =='user'); |
|
108 | + $this->assertTrue($roleField->getValue() == 'user'); |
|
109 | 109 | } |
110 | 110 | } |
@@ -8,9 +8,9 @@ discard block |
||
8 | 8 | use PHPUnit\Framework\TestCase; |
9 | 9 | 'modules' => array_merge($commonModules,array( |
10 | 10 | 'Core', |
11 | - 'Auth', |
|
12 | - 'Jobs', |
|
13 | - 'Organizations', |
|
11 | + 'Auth', |
|
12 | + 'Jobs', |
|
13 | + 'Organizations', |
|
14 | 14 | )), |
15 | 15 | |
16 | 16 | // These are various options for the listeners attached to the ModuleManager |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | // ), |
69 | 69 | // ) |
70 | 70 | |
71 | - // Initial configuration with which to seed the ServiceManager. |
|
72 | - // Should be compatible with Zend\ServiceManager\Config. |
|
73 | - // 'service_manager' => array(), |
|
71 | + // Initial configuration with which to seed the ServiceManager. |
|
72 | + // Should be compatible with Zend\ServiceManager\Config. |
|
73 | + // 'service_manager' => array(), |
|
74 | 74 | ); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | // This should be an array of module namespaces used in the application. |
7 | 7 | |
8 | 8 | use PHPUnit\Framework\TestCase; |
9 | - 'modules' => array_merge($commonModules,array( |
|
9 | + 'modules' => array_merge($commonModules, array( |
|
10 | 10 | 'Core', |
11 | 11 | 'Auth', |
12 | 12 | 'Jobs', |
@@ -60,7 +60,7 @@ |
||
60 | 60 | // ), |
61 | 61 | // ) |
62 | 62 | |
63 | - // Initial configuration with which to seed the ServiceManager. |
|
64 | - // Should be compatible with Zend\ServiceManager\Config. |
|
65 | - // 'service_manager' => array(), |
|
63 | + // Initial configuration with which to seed the ServiceManager. |
|
64 | + // Should be compatible with Zend\ServiceManager\Config. |
|
65 | + // 'service_manager' => array(), |
|
66 | 66 | ); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ]; |
55 | 55 | |
56 | 56 | /** @noinspection PhpUnusedPrivateFieldInspection */ |
57 | - private $inheritance = [ EventSubscriber::class ]; |
|
57 | + private $inheritance = [EventSubscriber::class]; |
|
58 | 58 | |
59 | 59 | |
60 | 60 | private function getTarget() |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function testSubscribesToOnFlushEvent() |
68 | 68 | { |
69 | - $this->assertEquals([ Events::onFlush ], $this->target->getSubscribedEvents()); |
|
69 | + $this->assertEquals([Events::onFlush], $this->target->getSubscribedEvents()); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function testUpdatesFilesPermissionsOnFlush() |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | $document->singleFile = $file; |
100 | 100 | $document->fileCollection = $collection; |
101 | 101 | |
102 | - $inserts = [ $document ]; |
|
103 | - $updates = [ $document ]; |
|
102 | + $inserts = [$document]; |
|
103 | + $updates = [$document]; |
|
104 | 104 | |
105 | 105 | $filePermissions->expects($this->exactly(4))->method('clear')->will($this->returnSelf()); |
106 | 106 | $filePermissions->expects($this->exactly(4))->method('inherit')->with($permissions)->will($this->returnSelf()); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | class ConcreteUpdateFilesPermissionsSubScriber extends AbstractUpdateFilesPermissionsSubscriber |
159 | 159 | { |
160 | - protected $filesProperties = [ 'singleFile', 'fileCollection' ]; |
|
160 | + protected $filesProperties = ['singleFile', 'fileCollection']; |
|
161 | 161 | protected $targetDocument = Ufps_TargetDocument::class; |
162 | 162 | } |
163 | 163 |