@@ -40,7 +40,7 @@ public function testParsePrivateKey()
4040 );
4141
4242 $ jwkSet = json_decode (
43- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
43+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
4444 true
4545 );
4646 $ jwkSet ['keys ' ][0 ]['d ' ] = 'privatekeyvalue ' ;
@@ -56,7 +56,7 @@ public function testParsePrivateKeyWithoutAlg()
5656 );
5757
5858 $ jwkSet = json_decode (
59- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
59+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
6060 true
6161 );
6262 unset($ jwkSet ['keys ' ][0 ]['alg ' ]);
@@ -67,7 +67,7 @@ public function testParsePrivateKeyWithoutAlg()
6767 public function testParseKeyWithEmptyDValue ()
6868 {
6969 $ jwkSet = json_decode (
70- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
70+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
7171 true
7272 );
7373
@@ -81,7 +81,7 @@ public function testParseKeyWithEmptyDValue()
8181 public function testParseJwkKeySet ()
8282 {
8383 $ jwkSet = json_decode (
84- file_get_contents (__DIR__ . '/rsa-jwkset.json ' ),
84+ file_get_contents (__DIR__ . '/data/ rsa-jwkset.json ' ),
8585 true
8686 );
8787 $ keys = JWK ::parseKeySet ($ jwkSet );
@@ -109,7 +109,7 @@ public function testParseJwkKeySet_empty()
109109 */
110110 public function testDecodeByJwkKeySetTokenExpired ()
111111 {
112- $ privKey1 = file_get_contents (__DIR__ . '/rsa1-private.pem ' );
112+ $ privKey1 = file_get_contents (__DIR__ . '/data/ rsa1-private.pem ' );
113113 $ payload = array ('exp ' => strtotime ('-1 hour ' ));
114114 $ msg = JWT ::encode ($ payload , $ privKey1 , 'RS256 ' , 'jwk1 ' );
115115
@@ -123,7 +123,7 @@ public function testDecodeByJwkKeySetTokenExpired()
123123 */
124124 public function testDecodeByJwkKeySet ()
125125 {
126- $ privKey1 = file_get_contents (__DIR__ . '/rsa1-private.pem ' );
126+ $ privKey1 = file_get_contents (__DIR__ . '/data/ rsa1-private.pem ' );
127127 $ payload = array ('sub ' => 'foo ' , 'exp ' => strtotime ('+10 seconds ' ));
128128 $ msg = JWT ::encode ($ payload , $ privKey1 , 'RS256 ' , 'jwk1 ' );
129129
@@ -137,7 +137,7 @@ public function testDecodeByJwkKeySet()
137137 */
138138 public function testDecodeByMultiJwkKeySet ()
139139 {
140- $ privKey2 = file_get_contents (__DIR__ . '/rsa2-private.pem ' );
140+ $ privKey2 = file_get_contents (__DIR__ . '/data/ rsa2-private.pem ' );
141141 $ payload = array ('sub ' => 'bar ' , 'exp ' => strtotime ('+10 seconds ' ));
142142 $ msg = JWT ::encode ($ payload , $ privKey2 , 'RS256 ' , 'jwk2 ' );
143143
0 commit comments