From 55f627d20b6eacb1773381ea4325d2159f9c3103 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 26 Feb 2019 14:16:59 +0100 Subject: Add an event to the Autocomplete Controller to allow to filter the results Signed-off-by: Joas Schilling --- tests/Core/Controller/AutoCompleteControllerTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/Core') 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 ); } -- cgit v1.2.3