Skip to content

Commit 19cdd31

Browse files
committed
Fix PageController tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 1b16dba commit 19cdd31

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

tests/unit/controller/PageControllerTest.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,33 @@
2424

2525
namespace OCA\Deck\Controller;
2626

27+
use OCA\Deck\Service\ConfigService;
2728
use OCA\Deck\Service\PermissionService;
2829
use OCP\IInitialStateService;
2930
use OCP\IL10N;
3031
use OCP\IRequest;
31-
use OCA\Deck\Db\Board;
32-
use OCP\IConfig;
3332

3433
class PageControllerTest extends \Test\TestCase {
3534
private $controller;
3635
private $request;
3736
private $l10n;
38-
private $userId = 'john';
3937
private $permissionService;
4038
private $initialState;
41-
private $config;
39+
private $configService;
4240

4341
public function setUp(): void {
4442
$this->l10n = $this->createMock(IL10N::class);
4543
$this->request = $this->createMock(IRequest::class);
4644
$this->permissionService = $this->createMock(PermissionService::class);
47-
$this->config = $this->createMock(IConfig::class);
45+
$this->configService = $this->createMock(ConfigService::class);
4846
$this->initialState = $this->createMock(IInitialStateService::class);
4947

5048
$this->controller = new PageController(
51-
'deck', $this->request, $this->permissionService, $this->initialState, $this->l10n, $this->userId
49+
'deck', $this->request, $this->permissionService, $this->initialState, $this->configService
5250
);
5351
}
5452

5553
public function testIndex() {
56-
$board = new Board();
57-
$board->setTitle('Personal');
58-
$board->setOwner($this->userId);
59-
$board->setColor('317CCC');
60-
6154
$this->permissionService->expects($this->any())
6255
->method('canCreate')
6356
->willReturn(true);

0 commit comments

Comments
 (0)