aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2025-07-10 13:10:19 +0200
committerGitHub <noreply@github.com>2025-07-10 13:10:19 +0200
commitc0b31d1e2d2d373205181904b38f88e47d4ee8ab (patch)
tree66360d164e8ede6ac509d880c5b9bf7464b4b3f3 /tests
parent345a0a07355182851c1616751cb3bd06351def1f (diff)
parentedf096a09f1e2de5206d5e718fdf483514d568c5 (diff)
downloadnextcloud-server-master.tar.gz
nextcloud-server-master.zip
Merge pull request #53892 from nextcloud/fix/cleanup-getinstallpathHEADmaster
fix: Move getInstallPath to Installer class
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/InstallerTest.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php
index 1813d2cd151..06163cdaedb 100644
--- a/tests/lib/InstallerTest.php
+++ b/tests/lib/InstallerTest.php
@@ -92,12 +92,7 @@ class InstallerTest extends TestCase {
// Read the current version of the app to check for bug #2572
Server::get(IAppManager::class)->getAppVersion('testapp', true);
- // Extract app
- $pathOfTestApp = __DIR__ . '/../data/testapp.zip';
- $tar = new ZIP($pathOfTestApp);
- $tar->extract(\OC_App::getInstallPath());
-
- // Install app
+ // Build installer
$installer = new Installer(
Server::get(AppFetcher::class),
Server::get(IClientService::class),
@@ -106,6 +101,13 @@ class InstallerTest extends TestCase {
Server::get(IConfig::class),
false
);
+
+ // Extract app
+ $pathOfTestApp = __DIR__ . '/../data/testapp.zip';
+ $tar = new ZIP($pathOfTestApp);
+ $tar->extract($installer->getInstallPath());
+
+ // Install app
$this->assertNull(Server::get(IConfig::class)->getAppValue('testapp', 'enabled', null), 'Check that the app is not listed before installation');
$this->assertSame('testapp', $installer->installApp(self::$appid));
$this->assertSame('no', Server::get(IConfig::class)->getAppValue('testapp', 'enabled', null), 'Check that the app is listed after installation');