public function test_install_should_remove_old_menu_item() { $menuRepository = $this->modelManger->getRepository(Menu::class); $oldMenuItem = $menuRepository->findOneBy(['label' => self::OLD_MENU_LABEL]); $this->createMenuItemIfItDoesNotExist($oldMenuItem, self::OLD_MENU_LABEL); $this->mainMenuItemInstaller->install(); $removedMenuItem = $menuRepository->findOneBy(['label' => self::OLD_MENU_LABEL]); $this->assertNull($removedMenuItem, 'Old menu item for SwagImportExport advanced should be removed on update or installation to 5.3.'); }
/** * @inheritdoc */ public function update() { $this->mainMenuItemInstaller->install(); }