Completed
Push — master ( 022616...175363 )
by Alex
08:53
created
Mezon/Application/Tests/CommonApplicationUnitTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -176,44 +176,44 @@
 block discarded – undo
176 176
     {
177 177
         $presenter = new TestingPresenter(new View(), 'Result');
178 178
         return [
179
-            [ // #0 testing controller
180
-                function (): TestCommonApplication {
179
+            [// #0 testing controller
180
+                function(): TestCommonApplication {
181 181
                     return new TestCommonApplication();
182 182
                 },
183 183
                 new TestingController('Result'),
184
-                function (array $params) {
184
+                function(array $params) {
185 185
                     $this->assertTrue($params[0]->wasCalled);
186 186
                 }
187 187
             ],
188
-            [ // #1 testing presenter
189
-                function (): TestCommonApplication {
188
+            [// #1 testing presenter
189
+                function(): TestCommonApplication {
190 190
                     return new TestCommonApplication();
191 191
                 },
192 192
                 $presenter,
193
-                function (array $params) {
193
+                function(array $params) {
194 194
                     $this->assertTrue($params[0]->wasCalled);
195 195
                 }
196 196
             ],
197
-            [ // #2 testing action message setup
198
-                function (): TestCommonApplication {
197
+            [// #2 testing action message setup
198
+                function(): TestCommonApplication {
199 199
                     $_GET['action-message'] = 'test-error';
200 200
                     return new TestCommonApplication();
201 201
                 },
202 202
                 $presenter,
203
-                function (array $params): void {
203
+                function(array $params): void {
204 204
                     $this->assertEquals('error', $params[1]->getTemplate()
205 205
                         ->getPageVar('action-message'));
206 206
                 }
207 207
             ],
208
-            [ // #3 no file with the messages
209
-                function (): TestCommonApplication {
208
+            [// #3 no file with the messages
209
+                function(): TestCommonApplication {
210 210
                     $_GET['action-message'] = 'test-error';
211 211
                     $application = new TestCommonApplication();
212 212
                     $application->hasMessages = false;
213 213
                     return $application;
214 214
                 },
215 215
                 $presenter,
216
-                function (array $params): void {
216
+                function(array $params): void {
217 217
                     $this->assertEquals('', $params[1]->getTemplate()
218 218
                         ->getPageVar('action-message'));
219 219
                 }
Please login to merge, or discard this patch.
Mezon/Application/CommonApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
     {
211 211
         $classPath = $this->getClassPath();
212 212
 
213
-        if (file_exists($classPath.'/res/action-messages.json')) {
213
+        if (file_exists($classPath . '/res/action-messages.json')) {
214 214
             $messages = json_decode(file_get_contents($classPath . '/res/action-messages.json'), true);
215 215
 
216 216
             if (isset($messages[$actionMessageCode])) {
Please login to merge, or discard this patch.