RefreshAppCommand example

public function testRefreshWithLimitation(): void
    {
        $commandTester = new CommandTester($this->createCommand(__DIR__ . '/_fixtures'));
        $commandTester->execute(['-f' => true, '--no-validate' => true, 'name' => ['validationFailure']]);

        static::assertStringNotContainsString('withPermissions', $commandTester->getDisplay());
        static::assertStringNotContainsString('withoutPermissions', $commandTester->getDisplay());
    }

    private function createCommand(string $appFolder): RefreshAppCommand
    {
        return new RefreshAppCommand(
            new AppService(
                new AppLifecycleIterator(
                    $this->getContainer()->get('app.repository'),
                    $this->getAppLoader($appFolder)
                ),
                $this->getContainer()->get(AppLifecycle::class)
            ),
            new AppPrinter($this->appRepository),
            $this->getContainer()->get(ManifestValidator::class)
        );
    }
}
Home | Imprint | This part of the site doesn't use cookies.