summaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-02-26 14:16:59 +0100
committerJoas Schilling <coding@schilljs.com>2019-02-26 15:32:14 +0100
commit55f627d20b6eacb1773381ea4325d2159f9c3103 (patch)
treeca15791da4954a8cb0a19123b101ed295e076696 /tests/Core
parentfc105d3bb006c94cc0d88864451252111ce33b16 (diff)
downloadnextcloud-server-55f627d20b6eacb1773381ea4325d2159f9c3103.tar.gz
nextcloud-server-55f627d20b6eacb1773381ea4325d2159f9c3103.zip
Add an event to the Autocomplete Controller to allow to filter the results
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Controller/AutoCompleteControllerTest.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php
index b1e9e6ba304..8ff0542cb0b 100644
--- a/tests/Core/Controller/AutoCompleteControllerTest.php
+++ b/tests/Core/Controller/AutoCompleteControllerTest.php
@@ -27,13 +27,17 @@ use OC\Core\Controller\AutoCompleteController;
use OCP\Collaboration\AutoComplete\IManager;
use OCP\Collaboration\Collaborators\ISearch;
use OCP\IRequest;
+use PHPUnit\Framework\MockObject\MockObject;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Test\TestCase;
class AutoCompleteControllerTest extends TestCase {
- /** @var ISearch|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISearch|MockObject */
protected $collaboratorSearch;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|MockObject */
protected $autoCompleteManager;
+ /** @var EventDispatcherInterface|MockObject */
+ protected $dispatcher;
/** @var AutoCompleteController */
protected $controller;
@@ -44,12 +48,14 @@ class AutoCompleteControllerTest extends TestCase {
$request = $this->createMock(IRequest::class);
$this->collaboratorSearch = $this->createMock(ISearch::class);
$this->autoCompleteManager = $this->createMock(IManager::class);
+ $this->dispatcher = $this->createMock(EventDispatcherInterface::class);
$this->controller = new AutoCompleteController(
'core',
$request,
$this->collaboratorSearch,
- $this->autoCompleteManager
+ $this->autoCompleteManager,
+ $this->dispatcher
);
}