diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-25 17:26:50 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-25 17:26:50 +0200 |
commit | fa2f03979b8262dfe65dd8c7ce017e1125f87e33 (patch) | |
tree | a73c236eef865080b8d435ad8b61445e8568e504 /tests/Core/Controller | |
parent | 3628d4d65d67d12afc93d969de61cb06a33179fd (diff) | |
download | nextcloud-server-fa2f03979b8262dfe65dd8c7ce017e1125f87e33.tar.gz nextcloud-server-fa2f03979b8262dfe65dd8c7ce017e1125f87e33.zip |
add search parameter to autocomplete controller
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests/Core/Controller')
-rw-r--r-- | tests/Core/Controller/AutoCompleteControllerTest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php index 59dac58b952..06d0bf5241d 100644 --- a/tests/Core/Controller/AutoCompleteControllerTest.php +++ b/tests/Core/Controller/AutoCompleteControllerTest.php @@ -27,6 +27,7 @@ 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; @@ -35,6 +36,8 @@ 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; @@ -45,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->config = $this->createMock(IConfig::class); $this->controller = new AutoCompleteController( 'core', $request, $this->collaboratorSearch, - $this->autoCompleteManager + $this->autoCompleteManager, + $this->config ); } @@ -75,7 +80,7 @@ class AutoCompleteControllerTest extends TestCase { ->method('search') ->willReturn([$searchResults, false]); - $response = $this->controller->get('files', '42', null); + $response = $this->controller->get('', 'files', '42', null); $list = $response->getData(); $this->assertEquals($expected, $list); // has better error output… |