This repository was archived by the owner on Feb 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
tests/Developer/Interceptors Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -142,30 +142,6 @@ public function testInterceptResponse_ShouldDoNothing_WhenNoPayload()
142142 $ this ->assertEquals (0 , sizeof ($ response ->getHeaders ()));
143143 }
144144
145- public function testInterceptResponse_ShouldThrowAnExceptionWhenEncryptionNotSupported ()
146- {
147- $ this ->expectException (EncryptionException::class);
148- $ this ->expectExceptionMessage ('Encryption method A192GCM not supported ' );
149-
150- // GIVEN
151- $ encryptedPayload = "{ " .
152- "\"encryptedPayload \": \"eyJraWQiOiI3NjFiMDAzYzFlYWRlM2E1NDkwZTUwMDBkMzc4ODdiYWE1ZTZlYzBlMjI2YzA3NzA2ZTU5OTQ1MWZjMDMyYTc5IiwiY3R5IjoiYXBwbGljYXRpb25cL2pzb24iLCJlbmMiOiJBMTkyR0NNIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.peSgTt_lPbcNStWh-gI3yMzhOGtFCwExFwLxKeHwjzsXvHB0Fml5XnG0jRbJSfOHzKx02d0NVBzoDDRSAnafuabbbMKcoaUK-jZNHSg4BHdyBZpCO82kzvWeEm3TTNHIMBTfM00EmdFB03z_a0PaWsT-FIOzu4Sd5Z_nsNLhP9941CtVS-YtZ9WkgDezGipxA7ejQ3X5gFVy2RH1gL8OTbzIYCwBcrfSjAiCQgunNbLxPPlfZHB_6prPK7_50NS6FvuMnAhiqUiiAka8DHMdeGBWOie2Q0FV_bsRDHx_6CY8kQA3F_NXz1dELIclJhdZFfRt1y-TEfwOIj4nDi2JnA.8BYMB5MkH2ZNyFGS._xb3uDsUQcPT5fQyZw.O0MzJ5OvNyj_QMuqaloTWA \"} " ;
153-
154- $ decryptionKey = DecryptionKey::load ("./resources/Keys/Pkcs8/test_key_pkcs8-2048.pem " );
155-
156- $ config = JweConfigBuilder::aJweEncryptionConfig ()
157- ->withDecryptionKey ($ decryptionKey )
158- ->withDecryptionPath ("$.encryptedPayload " , "$.foo " )
159- ->build ();
160-
161- $ headers = ['Content-Type ' => 'application/json ' ];
162- $ response = new Response (200 , $ headers , $ encryptedPayload );
163-
164- // WHEN
165- $ instanceUnderTest = new PsrHttpMessageJweInterceptor ($ config );
166- $ instanceUnderTest ->interceptResponse ($ response );
167- }
168-
169145 public function testInterceptResponse_ShouldThrowEncryptionException_WhenDecryptionFails ()
170146 {
171147 $ this ->expectException (EncryptionException::class);
You can’t perform that action at this time.
0 commit comments