getToBeInstalled example

$fails = $this->appService->doRefreshApps($input->getOption('activate')$context$refreshableApps->getAppNames());

        $this->appPrinter->printInstalledApps($io$context);
        $this->appPrinter->printIncompleteInstallations($io$fails);

        return self::SUCCESS;
    }

    private function validateRefreshableApps(RefreshableAppDryRun $refreshableApps, ShopwareStyle $io, Context $context): int
    {
        $refreshableManifests = array_merge(
            $refreshableApps->getToBeInstalled(),
            $refreshableApps->getToBeUpdated()
        );

        // validate refreshable apps         $invalids = [];
        foreach ($refreshableManifests as $refreshableManifest) {
            try {
                $this->manifestValidator->validate($refreshableManifest$context);
            } catch (AppValidationException|XmlParsingException $e) {
                $invalids[] = $e->getMessage();
            }
        }
 $this->context);

        $appService = new AppService(
            new AppLifecycleIterator(
                $this->appRepository,
                $this->getAppLoader(__DIR__ . '/Manifest/_fixtures')
            ),
            $this->getContainer()->get(AppLifecycle::class)
        );
        $refreshableApps = $appService->getRefreshableAppInfo($this->context);

        static::assertCount(9, $refreshableApps->getToBeInstalled());
        static::assertCount(1, $refreshableApps->getToBeUpdated());
        static::assertCount(1, $refreshableApps->getToBeDeleted());

        static::assertInstanceOf(Manifest::classarray_values($refreshableApps->getToBeInstalled())[0]);
        static::assertInstanceOf(Manifest::classarray_values($refreshableApps->getToBeUpdated())[0]);
        static::assertEquals('deleteTest', array_values($refreshableApps->getToBeDeleted())[0]);
    }

    public function testInstallFailureDoesNotAffectAllApps(): void
    {
        $appDir = __DIR__ . '/Manifest/_fixtures';
        
EOL,
            file_get_contents($this->appDir . '/TestApp/manifest.xml')
        );

        static::assertStringContainsString(
            'App TestApp has been successfully installed.',
            (string) preg_replace('/\s+/', ' ', trim($commandTester->getDisplay(true)))
        );

        static::assertCount(1, $this->appLifecycle->getToBeInstalled());
        static::assertArrayHasKey(self::APP_NAME, $this->appLifecycle->getToBeInstalled());
    }

    public function testAppIsInstalledIfRequestedViaOption(): void
    {
        $commandTester = $this->getCommandTester();
        $commandTester->execute(['name' => self::APP_NAME, '--install' => true]);

        static::assertStringContainsString(
            'Creating app structure under TestApp',
            (string) preg_replace('/\s+/', ' ', trim($commandTester->getDisplay(true)))
        );
Home | Imprint | This part of the site doesn't use cookies.