Remove config from AutoCompleteController

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/8336/head
Morris Jobke 7 years ago
parent b7c944fac1
commit bcf1668cc8
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
  1. 7
      core/Controller/AutoCompleteController.php
  2. 8
      tests/Core/Controller/AutoCompleteControllerTest.php

@ -27,7 +27,6 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\Collaboration\AutoComplete\IManager;
use OCP\Collaboration\Collaborators\ISearch;
use OCP\IConfig;
use OCP\IRequest;
use OCP\Share;
@ -36,21 +35,17 @@ class AutoCompleteController extends Controller {
private $collaboratorSearch;
/** @var IManager */
private $autoCompleteManager;
/** @var IConfig */
private $config;
public function __construct(
$appName,
IRequest $request,
ISearch $collaboratorSearch,
IManager $autoCompleteManager,
IConfig $config
IManager $autoCompleteManager
) {
parent::__construct($appName, $request);
$this->collaboratorSearch = $collaboratorSearch;
$this->autoCompleteManager = $autoCompleteManager;
$this->config = $config;
}
/**

@ -23,11 +23,9 @@
namespace Tests\Core\Controller;
use OC\Core\Controller\AutoCompleteController;
use OCP\Collaboration\AutoComplete\IManager;
use OCP\Collaboration\Collaborators\ISearch;
use OCP\IConfig;
use OCP\IRequest;
use Test\TestCase;
@ -36,8 +34,6 @@ class AutoCompleteControllerTest extends TestCase {
protected $collaboratorSearch;
/** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
protected $autoCompleteManager;
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
protected $config;
/** @var AutoCompleteController */
protected $controller;
@ -48,14 +44,12 @@ class AutoCompleteControllerTest extends TestCase {
$request = $this->createMock(IRequest::class);
$this->collaboratorSearch = $this->createMock(ISearch::class);
$this->autoCompleteManager = $this->createMock(IManager::class);
$this->config = $this->createMock(IConfig::class);
$this->controller = new AutoCompleteController(
'core',
$request,
$this->collaboratorSearch,
$this->autoCompleteManager,
$this->config
$this->autoCompleteManager
);
}

Loading…
Cancel
Save