aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/oauth2/tests')
-rw-r--r--apps/oauth2/tests/Controller/OauthApiControllerTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/oauth2/tests/Controller/OauthApiControllerTest.php b/apps/oauth2/tests/Controller/OauthApiControllerTest.php
index 24385e785e5..8977f6a2b66 100644
--- a/apps/oauth2/tests/Controller/OauthApiControllerTest.php
+++ b/apps/oauth2/tests/Controller/OauthApiControllerTest.php
@@ -45,6 +45,11 @@ use OCP\Security\ICrypto;
use OCP\Security\ISecureRandom;
use Test\TestCase;
+/* We have to use this to add a property to the mocked request and avoid warnings about dynamic properties on PHP>=8.2 */
+abstract class RequestMock implements IRequest {
+ public array $server = [];
+}
+
class OauthApiControllerTest extends TestCase {
/** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
@@ -68,7 +73,7 @@ class OauthApiControllerTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->request = $this->createMock(IRequest::class);
+ $this->request = $this->createMock(RequestMock::class);
$this->crypto = $this->createMock(ICrypto::class);
$this->accessTokenMapper = $this->createMock(AccessTokenMapper::class);
$this->clientMapper = $this->createMock(ClientMapper::class);