aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2/tests/Settings/AdminTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/oauth2/tests/Settings/AdminTest.php')
-rw-r--r--apps/oauth2/tests/Settings/AdminTest.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/oauth2/tests/Settings/AdminTest.php b/apps/oauth2/tests/Settings/AdminTest.php
index 022ae913e1e..c09a7b3420c 100644
--- a/apps/oauth2/tests/Settings/AdminTest.php
+++ b/apps/oauth2/tests/Settings/AdminTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
*
@@ -21,26 +22,38 @@
namespace OCA\OAuth2\Tests\Settings;
+use OCA\OAuth2\Db\ClientMapper;
use OCA\OAuth2\Settings\Admin;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IInitialStateService;
use Test\TestCase;
+use PHPUnit\Framework\MockObject\MockObject;
class AdminTest extends TestCase {
- /** @var Admin|\PHPUnit_Framework_MockObject_MockObject */
+
+ /** @var Admin|MockObject */
private $admin;
+ /** @var IInitialStateService|MockObject */
+ private $initialStateService;
+
+ /** @var ClientMapper|MockObject */
+ private $clientMapper;
+
public function setUp() {
parent::setUp();
- $this->admin = new Admin();
+ $this->initialStateService = $this->createMock(IInitialStateService::class);
+ $this->clientMapper = $this->createMock(ClientMapper::class);
+
+ $this->admin = new Admin($this->initialStateService, $this->clientMapper);
}
public function testGetForm() {
$expected = new TemplateResponse(
'oauth2',
'admin',
- [
- ],
+ [],
''
);
$this->assertEquals($expected, $this->admin->getForm());