aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-03-06 11:06:03 +0100
committerJoas Schilling <coding@schilljs.com>2019-03-06 11:06:03 +0100
commite13253c66ac4bbe5a73db08ffb9244e7f9669f19 (patch)
tree854fc622ca5b63c80a087aa3624152188b0ac49e /apps
parenta788da6ac22f331ac4789f24e908bb340ce89f6a (diff)
downloadnextcloud-server-e13253c66ac4bbe5a73db08ffb9244e7f9669f19.tar.gz
nextcloud-server-e13253c66ac4bbe5a73db08ffb9244e7f9669f19.zip
"Fix" the unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/AppInfo/Application.php2
-rw-r--r--apps/dav/tests/unit/AppInfo/ApplicationTest.php21
2 files changed, 3 insertions, 20 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index a90e42d56f8..41570ee7442 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -77,7 +77,7 @@ class Application extends App {
}
/**
- * @param IManager $contactsManager
+ * @param IContactsManager $contactsManager
*/
public function setupSystemContactsProvider(IContactsManager $contactsManager) {
/** @var ContactsManager $cm */
diff --git a/apps/dav/tests/unit/AppInfo/ApplicationTest.php b/apps/dav/tests/unit/AppInfo/ApplicationTest.php
index d4f53d360a9..d34749ec92b 100644
--- a/apps/dav/tests/unit/AppInfo/ApplicationTest.php
+++ b/apps/dav/tests/unit/AppInfo/ApplicationTest.php
@@ -26,7 +26,6 @@ namespace OCA\DAV\Tests\unit\AppInfo;
use OCA\DAV\AppInfo\Application;
use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\ContactsManager;
-use OCP\Contacts\IManager;
use Test\TestCase;
/**
@@ -43,24 +42,8 @@ class ApplicationTest extends TestCase {
// assert service instances in the container are properly setup
$s = $c->query(ContactsManager::class);
- $this->assertInstanceOf('OCA\DAV\CardDAV\ContactsManager', $s);
+ $this->assertInstanceOf(ContactsManager::class, $s);
$s = $c->query(CardDavBackend::class);
- $this->assertInstanceOf('OCA\DAV\CardDAV\CardDavBackend', $s);
- }
-
- public function testContactsManagerSetup() {
- $app = new Application();
- $c = $app->getContainer();
- $c->registerService(CardDavBackend::class, function() {
- $service = $this->createMock(CardDavBackend::class);
- $service->method('getAddressBooksForUser')->willReturn([]);
- return $service;
- });
-
- // assert setupContactsProvider() is proper
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject $cm */
- $cm = $this->createMock(IManager::class);
- $app->setupContactsProvider($cm, 'xxx');
- $this->addToAssertionCount(1);
+ $this->assertInstanceOf(CardDavBackend::class, $s);
}
}