mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-58219 oauth2: Fix unit tests because we changed the model
We added 2 fields to the model and we needed to update the tests. I also removed some error_log from the rest client (very useful while developing) Part of MDL-58220
This commit is contained in:
parent
ec504d94f6
commit
dece386586
@ -103,13 +103,8 @@ abstract class rest {
|
||||
$callargs = $rawpost;
|
||||
}
|
||||
|
||||
error_log('CALL REST');
|
||||
error_log($endpoint);
|
||||
error_log(json_encode($callargs));
|
||||
error_log($method);
|
||||
$this->curl->setHeader('Content-type: application/json');
|
||||
$response = $this->curl->$method($endpoint, $callargs);
|
||||
error_log($response);
|
||||
|
||||
if ($this->curl->errno == 0) {
|
||||
if ($responsetype == 'json') {
|
||||
|
@ -112,7 +112,9 @@ class core_oauth2_testcase extends advanced_testcase {
|
||||
$data = (object) [
|
||||
'issuerid' => $issuer->get('id'),
|
||||
'refreshtoken' => 'abc',
|
||||
'grantedscopes' => $requiredscopes
|
||||
'grantedscopes' => $requiredscopes,
|
||||
'email' => 'sys@example.com',
|
||||
'username' => 'sys'
|
||||
];
|
||||
$sys = new \core\oauth2\system_account(0, $data);
|
||||
$sys->create();
|
||||
|
Loading…
x
Reference in New Issue
Block a user