File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -190,8 +190,8 @@ public static function createVapidKeys(): array
190190 }
191191
192192 return [
193- 'publicKey ' => base64_encode ($ binaryPublicKey ),
194- 'privateKey ' => base64_encode ($ binaryPrivateKey )
193+ 'publicKey ' => Base64Url:: encode ($ binaryPublicKey ),
194+ 'privateKey ' => Base64Url:: encode ($ binaryPrivateKey )
195195 ];
196196 }
197197}
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public function testCreateVapidKeys()
9898 $ keys = VAPID ::createVapidKeys ();
9999 $ this ->assertArrayHasKey ('publicKey ' , $ keys );
100100 $ this ->assertArrayHasKey ('privateKey ' , $ keys );
101- $ this ->assertEquals ( strlen ($ keys ['publicKey ' ]), 88 );
102- $ this ->assertEquals ( strlen ($ keys ['privateKey ' ]), 44 );
101+ $ this ->assertGreaterThanOrEqual ( 86 , strlen ($ keys ['publicKey ' ]));
102+ $ this ->assertGreaterThanOrEqual ( 42 , strlen ($ keys ['privateKey ' ]));
103103 }
104104}
You can’t perform that action at this time.
0 commit comments