@@ -62,7 +62,7 @@ public function testGetAuthURL():void{
6262 $ this ::assertArrayNotHasKey ('client_secret ' , $ query );
6363 $ this ::assertSame ($ this ->options ->key , $ query ['client_id ' ]);
6464 $ this ::assertSame ('code ' , $ query ['response_type ' ]);
65- $ this ::assertSame (explode ('? ' , (string )$ url )[0 ], $ this ->reflection -> getProperty ('authURL ' )-> getValue ( $ this -> provider ));
65+ $ this ::assertSame (explode ('? ' , (string )$ url )[0 ], $ this ->getReflectionProperty ('authURL ' ));
6666 }
6767
6868 public function testGetAccessToken ():void {
@@ -107,19 +107,19 @@ public function testGetRequestAuthorization():void{
107107 $ request = $ this ->requestFactory ->createRequest ('GET ' , 'https://foo.bar ' );
108108 $ token = new AccessToken (['accessTokenSecret ' => 'test_token_secret ' , 'accessToken ' => 'test_token ' ]);
109109
110- $ authMethod = $ this ->reflection -> getProperty ('authMethod ' )-> getValue ( $ this -> provider );
110+ $ authMethod = $ this ->getReflectionProperty ('authMethod ' );
111111
112112 // header (default)
113113 if ($ authMethod === OAuth2Interface::AUTH_METHOD_HEADER ){
114114 $ this ::assertStringContainsString (
115- $ this ->reflection -> getProperty ('authMethodHeader ' )-> getValue ( $ this -> provider ).' test_token ' ,
115+ $ this ->getReflectionProperty ('authMethodHeader ' ).' test_token ' ,
116116 $ this ->provider ->getRequestAuthorization ($ request , $ token )->getHeaderLine ('Authorization ' )
117117 );
118118 }
119119 // query
120120 elseif ($ authMethod === OAuth2Interface::AUTH_METHOD_QUERY ){
121121 $ this ::assertStringContainsString (
122- $ this ->reflection -> getProperty ('authMethodQuery ' )-> getValue ( $ this -> provider ).'=test_token ' ,
122+ $ this ->getReflectionProperty ('authMethodQuery ' ).'=test_token ' ,
123123 $ this ->provider ->getRequestAuthorization ($ request , $ token )->getUri ()->getQuery ()
124124 );
125125 }
@@ -137,7 +137,7 @@ public function testRequestInvalidAuthTypeException():void{
137137 $ this ->expectException (OAuthException::class);
138138 $ this ->expectExceptionMessage ('invalid auth type ' );
139139
140- $ this ->reflection -> getProperty ('authMethod ' )-> setValue ( $ this -> provider , -1 );
140+ $ this ->setReflectionProperty ('authMethod ' , -1 );
141141
142142 $ token = new AccessToken (['accessToken ' => 'test_access_token_secret ' , 'expires ' => 1 ]);
143143 $ this ->provider ->storeAccessToken ($ token );
0 commit comments