Passed
Pull Request — develop (#319)
by Michiel
19:41 queued 14:36
created
tests/features/bootstrap/FeatureContext.php 1 patch
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -83,15 +83,15 @@  discard block
 block discarded – undo
83 83
     public function aUserIdentifiedByWithAVettedToken($institution, $nameId, $tokenType)
84 84
     {
85 85
         switch (strtolower($tokenType)) {
86
-        case "yubikey":
87
-            $this->currentToken = $this->fixtureService->registerYubikeyToken($nameId, $institution);
88
-            break;
89
-        case "sms":
90
-            $this->currentToken = $this->fixtureService->registerSmsToken($nameId, $institution);
91
-            break;
92
-        case "tiqr":
93
-            $this->currentToken = $this->fixtureService->registerTiqrToken($nameId, $institution);
94
-            break;
86
+            case "yubikey":
87
+                $this->currentToken = $this->fixtureService->registerYubikeyToken($nameId, $institution);
88
+                break;
89
+            case "sms":
90
+                $this->currentToken = $this->fixtureService->registerSmsToken($nameId, $institution);
91
+                break;
92
+            case "tiqr":
93
+                $this->currentToken = $this->fixtureService->registerTiqrToken($nameId, $institution);
94
+                break;
95 95
         }
96 96
     }
97 97
 
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
     public function aUserIdentifiedByWithASelfAssertedToken($institution, $nameId, $tokenType)
102 102
     {
103 103
         switch (strtolower($tokenType)) {
104
-        case "yubikey":
105
-            $this->currentToken = $this->fixtureService->registerYubikeyToken($nameId, $institution, true);
106
-            break;
107
-        case "sms":
108
-            $this->currentToken = $this->fixtureService->registerSmsToken($nameId, $institution, true);
109
-            break;
110
-        case "tiqr":
111
-            $this->currentToken = $this->fixtureService->registerTiqrToken($nameId, $institution, true);
112
-            break;
104
+            case "yubikey":
105
+                $this->currentToken = $this->fixtureService->registerYubikeyToken($nameId, $institution, true);
106
+                break;
107
+            case "sms":
108
+                $this->currentToken = $this->fixtureService->registerSmsToken($nameId, $institution, true);
109
+                break;
110
+            case "tiqr":
111
+                $this->currentToken = $this->fixtureService->registerTiqrToken($nameId, $institution, true);
112
+                break;
113 113
         }
114 114
     }
115 115
 
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
     public function anInstitutionThatAllows(string $institution, string $option)
198 198
     {
199 199
         switch(true) {
200
-        case $option === 'sso_on_2fa':
201
-            $optionColumnName = 'sso_on2fa_enabled';
202
-            break;
203
-        default:
204
-            throw new RuntimeException(sprintf('Option "%s" is not supported', $option));
200
+            case $option === 'sso_on_2fa':
201
+                $optionColumnName = 'sso_on2fa_enabled';
202
+                break;
203
+            default:
204
+                throw new RuntimeException(sprintf('Option "%s" is not supported', $option));
205 205
         }
206 206
         $this->fixtureService->configureBoolean($institution, $optionColumnName, true);
207 207
     }
@@ -212,15 +212,15 @@  discard block
 block discarded – undo
212 212
     public function iShouldSelectMyTokenOnTheWAYG($tokenType)
213 213
     {
214 214
         switch (strtolower($tokenType)) {
215
-        case "yubikey":
216
-            $this->minkContext->pressButton('gateway_choose_second_factor_choose_yubikey');
217
-            break;
218
-        case "sms":
219
-            $this->minkContext->pressButton('gateway_choose_second_factor_choose_sms');
220
-            break;
221
-        case "tiqr":
222
-            $this->minkContext->pressButton('gateway_choose_second_factor_choose_tiqr');
223
-            break;
215
+            case "yubikey":
216
+                $this->minkContext->pressButton('gateway_choose_second_factor_choose_yubikey');
217
+                break;
218
+            case "sms":
219
+                $this->minkContext->pressButton('gateway_choose_second_factor_choose_sms');
220
+                break;
221
+            case "tiqr":
222
+                $this->minkContext->pressButton('gateway_choose_second_factor_choose_tiqr');
223
+                break;
224 224
         }
225 225
     }
226 226
 
Please login to merge, or discard this patch.
tests/features/bootstrap/ServiceProviderContext.php 1 patch
Switch Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -186,20 +186,20 @@  discard block
 block discarded – undo
186 186
             $this->loadPrivateKey(new PrivateKey('/var/www/html/ci/certificates/sp.key', 'default'))
187 187
         );
188 188
         switch ($loa) {
189
-        case "1":
190
-        case "2":
191
-        case "3":
192
-            $authnRequest->setRequestedAuthnContext(
193
-                ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/sfo-level' . $loa]]
194
-            );
195
-            break;
196
-        case "self-asserted":
197
-            $authnRequest->setRequestedAuthnContext(
198
-                ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/loa-self-asserted']]
199
-            );
200
-            break;
201
-        default:
202
-            throw new RuntimeException(sprintf('The specified LoA-%s is not supported', $loa));
189
+            case "1":
190
+            case "2":
191
+            case "3":
192
+                $authnRequest->setRequestedAuthnContext(
193
+                    ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/sfo-level' . $loa]]
194
+                );
195
+                break;
196
+            case "self-asserted":
197
+                $authnRequest->setRequestedAuthnContext(
198
+                    ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/loa-self-asserted']]
199
+                );
200
+                break;
201
+            default:
202
+                throw new RuntimeException(sprintf('The specified LoA-%s is not supported', $loa));
203 203
         }
204 204
         $request = Saml2AuthnRequest::createNew($authnRequest);
205 205
         $query = $request->buildRequestQuery();
@@ -284,19 +284,19 @@  discard block
 block discarded – undo
284 284
         );
285 285
 
286 286
         switch ($loa) {
287
-        case "1":
288
-        case "2":
289
-        case "3":
290
-            $authnRequest->setRequestedAuthnContext(
291
-                ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/level' . $loa]]
292
-            );
293
-            break;
294
-        case "self-asserted":
295
-            $authnRequest->setRequestedAuthnContext(
296
-                ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/loa-self-asserted']]
297
-            );
298
-        default:
299
-            throw new RuntimeException(sprintf('The specified LoA-%s is not supported', $loa));
287
+            case "1":
288
+            case "2":
289
+            case "3":
290
+                $authnRequest->setRequestedAuthnContext(
291
+                    ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/level' . $loa]]
292
+                );
293
+                break;
294
+            case "self-asserted":
295
+                $authnRequest->setRequestedAuthnContext(
296
+                    ['AuthnContextClassRef' => ['http://stepup.example.com/assurance/loa-self-asserted']]
297
+                );
298
+            default:
299
+                throw new RuntimeException(sprintf('The specified LoA-%s is not supported', $loa));
300 300
         }
301 301
 
302 302
         $request = Saml2AuthnRequest::createNew($authnRequest);
Please login to merge, or discard this patch.