1
0

ApplicationTest.php 833 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\DAV\Tests\unit\AppInfo;
  8. use OCA\DAV\AppInfo\Application;
  9. use OCA\DAV\CardDAV\CardDavBackend;
  10. use OCA\DAV\CardDAV\ContactsManager;
  11. use Test\TestCase;
  12. /**
  13. * Class ApplicationTest
  14. *
  15. * @group DB
  16. *
  17. * @package OCA\DAV\Tests\Unit\AppInfo
  18. */
  19. class ApplicationTest extends TestCase {
  20. public function test(): void {
  21. $app = new Application();
  22. $c = $app->getContainer();
  23. // assert service instances in the container are properly setup
  24. $s = $c->query(ContactsManager::class);
  25. $this->assertInstanceOf(ContactsManager::class, $s);
  26. $s = $c->query(CardDavBackend::class);
  27. $this->assertInstanceOf(CardDavBackend::class, $s);
  28. }
  29. }