getUpgradedAt example

static::assertSame('Deutsche Beschreibung', $plugin->getDescription());
        static::assertSame('https://www.test.de/', $plugin->getManufacturerLink());
        static::assertSame('https://www.test.de/support', $plugin->getSupportLink());
    }

    private function assertPluginMetaInformation(PluginEntity $plugin): void
    {
        static::assertNotNull($plugin->getCreatedAt());
        static::assertNull($plugin->getUpdatedAt());
        static::assertNull($plugin->getUpgradeVersion());
        static::assertNull($plugin->getInstalledAt());
        static::assertNull($plugin->getUpgradedAt());
        static::assertSame($this->getValidIconAsBase64()$plugin->getIcon());
        static::assertSame('shopware AG', $plugin->getAuthor());
        static::assertSame('(c) by shopware AG', $plugin->getCopyright());
        static::assertSame('MIT', $plugin->getLicense());
    }

    private function fetchSwagTestPluginEntity(?Context $context = null): PluginEntity
    {
        if ($context === null) {
            $context = $this->context;
        }

        
$installedAt,
            $pluginInstalled->getInstalledAt()->format(Defaults::STORAGE_DATE_TIME_FORMAT)
        );
    }

    private function installPluginWithUpdate(Context $context): void
    {
        $this->createPlugin($this->pluginRepo, $context, SwagTest::PLUGIN_OLD_VERSION);
        $pluginInstalled = $this->installPlugin($context);

        static::assertNotNull($pluginInstalled->getInstalledAt());
        static::assertNull($pluginInstalled->getUpgradedAt());
        static::assertSame(SwagTest::PLUGIN_VERSION, $pluginInstalled->getVersion());
    }

    private function uninstallPlugin(Context $context): void
    {
        $pluginInstalled = $this->installPlugin($context);
        static::assertNotNull($pluginInstalled->getInstalledAt());

        $this->pluginLifecycleService->activatePlugin($pluginInstalled$context);
        static::assertTrue($pluginInstalled->getActive());

        


    public function testInstallUpgradeVersion(): void
    {
        $pluginEntityMock = $this->getPluginEntityMock();
        $context = Context::createDefaultContext();

        $pluginEntityMock->setUpgradeVersion('9999999');

        $this->pluginLifecycleService->installPlugin($pluginEntityMock$context);

        static::assertNotNull($pluginEntityMock->getUpgradedAt());
    }

    public function testInstallPluginMajor(): void
    {
        $pluginEntityMock = $this->getPluginEntityMock();
        $context = Context::createDefaultContext();

        $this->pluginMock->expects(static::once())->method('executeComposerCommands')->willReturn(true);
        $pluginEntityMock->setComposerName('MockPlugin');

        $this->pluginServiceMock->expects(static::once())->method('refreshPlugins');

        
'label' => $plugin->getTranslation('label'),
            'producerName' => $plugin->getAuthor(),
            'license' => $plugin->getLicense(),
            'version' => $plugin->getVersion(),
            'latestVersion' => $plugin->getUpgradeVersion(),
            'iconRaw' => $plugin->getIcon(),
            'installedAt' => $plugin->getInstalledAt(),
            'active' => $plugin->getActive(),
            'type' => ExtensionStruct::EXTENSION_TYPE_PLUGIN,
            'isTheme' => $isTheme,
            'configurable' => $this->configurationService->checkConfiguration(sprintf('%s.config', $plugin->getName())$context),
            'updatedAt' => $plugin->getUpgradedAt(),
            'allowDisable' => true,
        ];

        return ExtensionStruct::fromArray($this->replaceCollections($data));
    }

    /** * @return array<string> */
    private function getInstalledThemeNames(Context $context): array
    {
        
Home | Imprint | This part of the site doesn't use cookies.