From d3f883752f24ab3661c77d78b10b62dc0b2d2414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Fri, 24 Jul 2020 10:56:59 +0200 Subject: Improve performance, sort contacts, exclude read-only and exclude already selected ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- tests/unit/Controller/PageControllerTest.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/unit/Controller/PageControllerTest.php b/tests/unit/Controller/PageControllerTest.php index 853bc29f..c7570f99 100644 --- a/tests/unit/Controller/PageControllerTest.php +++ b/tests/unit/Controller/PageControllerTest.php @@ -24,16 +24,17 @@ namespace OCA\Contacts\Controller; +use ChristophWurst\Nextcloud\Testing\TestCase; +use OCA\Contacts\Service\SocialApiService; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IAppManager; use OCP\IConfig; -use PHPUnit\Framework\MockObject\MockObject; use OCP\IInitialStateService; +use OCP\IRequest; use OCP\IUser; use OCP\IUserSession; -use OCP\IRequest; use OCP\L10N\IFactory; -use OCA\Contacts\Service\SocialApiService; -use ChristophWurst\Nextcloud\Testing\TestCase; +use PHPUnit\Framework\MockObject\MockObject; class PageControllerTest extends TestCase { private $controller; @@ -56,6 +57,9 @@ class PageControllerTest extends TestCase { /** @var SocialApiService|MockObject*/ private $socialApi; + /** @var IAppManager|MockObject*/ + private $appManager; + public function setUp() { parent::setUp(); @@ -65,6 +69,7 @@ class PageControllerTest extends TestCase { $this->languageFactory = $this->createMock(IFactory::class); $this->userSession = $this->createMock(IUserSession::class); $this->socialApi = $this->createMock(SocialApiService::class); + $this->appManager = $this->createMock(IAppManager::class); $this->controller = new PageController( $this->request, @@ -72,7 +77,8 @@ class PageControllerTest extends TestCase { $this->initialStateService, $this->languageFactory, $this->userSession, - $this->socialApi + $this->socialApi, + $this->appManager ); } -- cgit v1.2.3