diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-07-24 10:56:59 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-08-21 10:05:42 +0200 |
commit | d3f883752f24ab3661c77d78b10b62dc0b2d2414 (patch) | |
tree | 393371c96a4e4409d0d08eb0d89274ec6a1de181 /tests | |
parent | 68cb27a5b4ef0eecd7a0af597d3050bc709c5754 (diff) |
Improve performance, sort contacts, exclude read-only and exclude already selected ones
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/Controller/PageControllerTest.php | 16 |
1 files changed, 11 insertions, 5 deletions
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 ); } |