public function test_it_should_be_incompatible() { $setupContext = new SetupContext('', '1.9.0', ''); $dbalConnectionMock = $this->createMock(Connection::class); $installer = new DefaultProfileInstaller($setupContext, $dbalConnectionMock); $isCompatible = $installer->isCompatible(); $this->assertFalse($isCompatible); }
/** * @inheritdoc * @throws \Exception */ public function update() { try { $this->connection->executeQuery('ALTER TABLE s_import_export_profile ADD UNIQUE (`name`);'); $defaultProfileInstaller = new DefaultProfileInstaller($this->setupContext, $this->connection); $defaultProfileInstaller->install(); } catch (DBALException $exception) { if (!$this->isDuplicateNameError($exception)) { throw $exception; } throw new DuplicateNameException($this->snippetManager->getNamespace('backend/swag_importexport/default_profiles')->get('update/duplicate_names')); } }