From 12c0cfc977fae691fd09fe916d533397ee448d46 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 10 Jul 2025 09:39:58 +0200 Subject: fix: Move getInstallPath to Installer class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method does not need a public API for now, it’s only used internally. Signed-off-by: Côme Chilliet --- tests/lib/InstallerTest.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests') 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'); -- cgit v1.2.3