Skip to content

Commit

Permalink
Fix PageController tests
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Sep 15, 2020
1 parent 1b16dba commit 19cdd31
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions tests/unit/controller/PageControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,33 @@

namespace OCA\Deck\Controller;

use OCA\Deck\Service\ConfigService;
use OCA\Deck\Service\PermissionService;
use OCP\IInitialStateService;
use OCP\IL10N;
use OCP\IRequest;
use OCA\Deck\Db\Board;
use OCP\IConfig;

class PageControllerTest extends \Test\TestCase {
private $controller;
private $request;
private $l10n;
private $userId = 'john';
private $permissionService;
private $initialState;
private $config;
private $configService;

public function setUp(): void {
$this->l10n = $this->createMock(IL10N::class);
$this->request = $this->createMock(IRequest::class);
$this->permissionService = $this->createMock(PermissionService::class);
$this->config = $this->createMock(IConfig::class);
$this->configService = $this->createMock(ConfigService::class);
$this->initialState = $this->createMock(IInitialStateService::class);

$this->controller = new PageController(
'deck', $this->request, $this->permissionService, $this->initialState, $this->l10n, $this->userId
'deck', $this->request, $this->permissionService, $this->initialState, $this->configService
);
}

public function testIndex() {
$board = new Board();
$board->setTitle('Personal');
$board->setOwner($this->userId);
$board->setColor('317CCC');

$this->permissionService->expects($this->any())
->method('canCreate')
->willReturn(true);
Expand Down

0 comments on commit 19cdd31

Please sign in to comment.