diff --git a/classes/renderables/wrapper.php b/classes/renderables/wrapper.php index ad9ed1a..d5ae899 100644 --- a/classes/renderables/wrapper.php +++ b/classes/renderables/wrapper.php @@ -29,4 +29,5 @@ class wrapper implements \renderable { public $url; public $canviewfeedback; public $isimage; + public $candownload; } diff --git a/tests/jwthelper_test.php b/tests/jwthelper_test.php index 26c398c..f34011e 100644 --- a/tests/jwthelper_test.php +++ b/tests/jwthelper_test.php @@ -56,12 +56,12 @@ protected function validate_token($token, $userid, $courseid, $roles) { $payload = \Firebase\JWT\JWT::decode($token, new Key($secret, 'HS256')); - $this->assertObjectHasAttribute('return_url', $payload); - $this->assertObjectHasAttribute('iat', $payload); - $this->assertObjectHasAttribute('user_id', $payload); - $this->assertObjectHasAttribute('course_id', $payload); - $this->assertObjectHasAttribute('locale', $payload); - $this->assertObjectHasAttribute('roles', $payload); + $this->assertObjectHasProperty('return_url', $payload); + $this->assertObjectHasProperty('iat', $payload); + $this->assertObjectHasProperty('user_id', $payload); + $this->assertObjectHasProperty('course_id', $payload); + $this->assertObjectHasProperty('locale', $payload); + $this->assertObjectHasProperty('roles', $payload); $this->assertSame($payload->return_url, $CFG->wwwroot); if ($userid != null) {