@@ -118,19 +118,20 @@ public function testGetProfileAndTokenReturnsProfileWithExpectedValues()
118118 public function testGetProfileReturnsProfileWithExpectedValues ()
119119 {
120120 $ path = "sso/profile " ;
121+ $ token = 'token ' ;
121122
122- $ result = $ this ->profileAndTokenResponseFixture ();
123+ $ result = $ this ->profileResponseFixture ();
123124
124125 $ this ->mockRequest (
125126 Client::METHOD_GET ,
126127 $ path ,
128+ ['Authorization: Bearer ' . $ token ],
127129 null ,
128- null ,
129- true ,
130+ false ,
130131 $ result
131132 );
132133
133- $ profile = $ this ->sso ->getProfile ();
134+ $ profile = $ this ->sso ->getProfile ($ token );
134135 $ profileFixture = $ this ->profileFixture ();
135136
136137 $ this ->assertEquals ($ profileFixture , $ profile ->toArray ());
@@ -280,6 +281,31 @@ private function profileFixture()
280281 ];
281282 }
282283
284+ private function profileResponseFixture ()
285+ {
286+ return json_encode ([
287+ "id " => "prof_hen " ,
288+ "email " => "hen@papagenos.com " ,
289+ "first_name " => "hen " ,
290+ "last_name " => "cha " ,
291+ "organization_id " => "org_01FG7HGMY2CZZR2FWHTEE94VF0 " ,
292+ "connection_id " => "conn_01EMH8WAK20T42N2NBMNBCYHAG " ,
293+ "connection_type " => "GoogleOAuth " ,
294+ "idp_id " => "randomalphanum " ,
295+ "role " => new RoleResponse ("admin " ),
296+ "groups " => array ("Admins " , "Developers " ),
297+ "custom_attributes " => array ("license " => "professional " ),
298+ "raw_attributes " => array (
299+ "email " => "hen@papagenos.com " ,
300+ "first_name " => "hen " ,
301+ "last_name " => "cha " ,
302+ "ipd_id " => "randomalphanum " ,
303+ "groups " => array ("Admins " , "Developers " ),
304+ "license " => "professional "
305+ ),
306+ ]);
307+ }
308+
283309 private function connectionFixture ()
284310 {
285311 return [
0 commit comments