diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-07-10 13:10:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-10 13:10:19 +0200 |
commit | c0b31d1e2d2d373205181904b38f88e47d4ee8ab (patch) | |
tree | 66360d164e8ede6ac509d880c5b9bf7464b4b3f3 /tests | |
parent | 345a0a07355182851c1616751cb3bd06351def1f (diff) | |
parent | edf096a09f1e2de5206d5e718fdf483514d568c5 (diff) | |
download | nextcloud-server-master.tar.gz nextcloud-server-master.zip |
fix: Move getInstallPath to Installer class
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/InstallerTest.php | 14 |
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'); |