1
0

AppLocatorTest.php 814 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace Test\IntegrityCheck\Helpers;
  8. use OC\IntegrityCheck\Helpers\AppLocator;
  9. use Test\TestCase;
  10. class AppLocatorTest extends TestCase {
  11. /** @var AppLocator */
  12. private $locator;
  13. protected function setUp(): void {
  14. parent::setUp();
  15. $this->locator = new AppLocator();
  16. }
  17. public function testGetAppPath(): void {
  18. $this->assertSame(\OC_App::getAppPath('files'), $this->locator->getAppPath('files'));
  19. }
  20. public function testGetAppPathNotExistentApp(): void {
  21. $this->expectException(\Exception::class);
  22. $this->expectExceptionMessage('App not found');
  23. $this->locator->getAppPath('aTotallyNotExistingApp');
  24. }
  25. }