diff --git a/apps/appstore/lib/Controller/PageController.php b/apps/appstore/lib/Controller/PageController.php index f77d004626c..d218e612ac1 100644 --- a/apps/appstore/lib/Controller/PageController.php +++ b/apps/appstore/lib/Controller/PageController.php @@ -23,7 +23,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; use OCP\IL10N; -use OCP\INavigationManager; use OCP\IRequest; use OCP\IURLGenerator; use OCP\Server; @@ -41,7 +40,6 @@ final class PageController extends Controller { private readonly IURLGenerator $urlGenerator, private readonly IInitialState $initialState, private readonly BundleFetcher $bundleFetcher, - private readonly INavigationManager $navigationManager, ) { parent::__construct(Application::APP_ID, $request); } @@ -51,8 +49,6 @@ final class PageController extends Controller { #[FrontpageRoute(verb: 'GET', url: '/settings/apps/{category}', defaults: ['category' => ''], root: '')] #[FrontpageRoute(verb: 'GET', url: '/settings/apps/{category}/{id}', defaults: ['category' => '', 'id' => ''], root: '')] public function viewApps(): TemplateResponse { - $this->navigationManager->setActiveEntry('core_apps'); - $this->initialState->provideInitialState('appstoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true)); $this->initialState->provideInitialState('appstoreBundles', $this->getBundles()); $this->initialState->provideInitialState('appstoreDeveloperDocs', $this->urlGenerator->linkToDocs('developer-manual')); diff --git a/apps/appstore/tests/Controller/PageControllerTest.php b/apps/appstore/tests/Controller/PageControllerTest.php index 1e5edfe061f..b41683fa616 100644 --- a/apps/appstore/tests/Controller/PageControllerTest.php +++ b/apps/appstore/tests/Controller/PageControllerTest.php @@ -16,7 +16,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; use OCP\IL10N; -use OCP\INavigationManager; use OCP\IRequest; use OCP\IURLGenerator; use PHPUnit\Framework\MockObject\MockObject; @@ -30,8 +29,6 @@ final class PageControllerTest extends TestCase { private IConfig&MockObject $config; - private INavigationManager&MockObject $navigationManager; - private IAppManager&MockObject $appManager; private BundleFetcher&MockObject $bundleFetcher; @@ -54,7 +51,6 @@ final class PageControllerTest extends TestCase { ->method('t') ->willReturnArgument(0); $this->config = $this->createMock(IConfig::class); - $this->navigationManager = $this->createMock(INavigationManager::class); $this->appManager = $this->createMock(IAppManager::class); $this->bundleFetcher = $this->createMock(BundleFetcher::class); $this->installer = $this->createMock(Installer::class); @@ -70,7 +66,6 @@ final class PageControllerTest extends TestCase { $this->urlGenerator, $this->initialState, $this->bundleFetcher, - $this->navigationManager, ); } @@ -84,10 +79,6 @@ final class PageControllerTest extends TestCase { ->method('getSystemValueBool') ->with('appstoreenabled', true) ->willReturn(true); - $this->navigationManager - ->expects($this->once()) - ->method('setActiveEntry') - ->with('core_apps'); $this->initialState ->expects($this->exactly(4)) @@ -117,10 +108,6 @@ final class PageControllerTest extends TestCase { ->method('getSystemValueBool') ->with('appstoreenabled', true) ->willReturn(false); - $this->navigationManager - ->expects($this->once()) - ->method('setActiveEntry') - ->with('core_apps'); $this->initialState ->expects($this->exactly(4))