removeApp example

private string $appDir;

    protected function setUp(): void
    {
        $this->appLifecycle = new RefreshableAppDryRun();
        $this->appDir = __DIR__ . '/_fixtures/create-app-project';
    }

    protected function tearDown(): void
    {
        $this->removeApp();
    }

    public function testSuccessfulCreateCommand(): void
    {
        $commandTester = $this->getCommandTester();

        $commandTester->execute(['name' => self::APP_NAME]);

        static::assertStringContainsString(
            'Creating app structure under TestApp',
            (string) preg_replace('/\s+/', ' ', trim($commandTester->getDisplay(true)))
        );
protected Source $source;

    protected OrderTransactionEntity $orderTransaction;

    public function __construct(
        OrderTransactionEntity $orderTransaction,
        protected OrderEntity $order,
        protected Struct $preOrderPayment,
        protected ?RecurringDataStruct $recurring = null,
    ) {
        $this->orderTransaction = $this->removeApp($orderTransaction);
    }

    public function setSource(Source $source): void
    {
        $this->source = $source;
    }

    public function getSource(): Source
    {
        return $this->source;
    }

    
use RemoveAppTrait;

    protected Source $source;

    protected OrderTransactionCaptureRefundEntity $refund;

    public function __construct(
        OrderTransactionCaptureRefundEntity $refund,
        protected OrderEntity $order
    ) {
        if ($refund->getTransactionCapture() && $refund->getTransactionCapture()->getTransaction()) {
            $transaction = $this->removeApp($refund->getTransactionCapture()->getTransaction());
            $refund->getTransactionCapture()->setTransaction($transaction);
        }

        $this->refund = $refund;
    }

    public function getOrderTransaction(): OrderTransactionEntity
    {
        if ($this->refund->getTransactionCapture() && $this->refund->getTransactionCapture()->getTransaction()) {
            return $this->refund->getTransactionCapture()->getTransaction();
        }

        
protected OrderTransactionEntity $orderTransaction;

    /** * @param mixed[] $requestData */
    public function __construct(
        OrderTransactionEntity $orderTransaction,
        protected OrderEntity $order,
        protected array $requestData = [],
        protected ?RecurringDataStruct $recurring = null,
    ) {
        $this->orderTransaction = $this->removeApp($orderTransaction);
    }

    public function setSource(Source $source): void
    {
        $this->source = $source;
    }

    public function getSource(): Source
    {
        return $this->source;
    }

    

        $this->lifecycleService = $this->getContainer()->get(ExtensionLifecycleService::class);

        $this->appRepository = $this->getContainer()->get('app.repository');
        $this->themeRepository = $this->getContainer()->get('theme.repository', ContainerInterface::NULL_ON_INVALID_REFERENCE);
        $this->salesChannelRepository = $this->getContainer()->get('sales_channel.repository');
        $this->context = new Context(new SystemSource()[], Defaults::CURRENCY, [Defaults::LANGUAGE_SYSTEM]);
    }

    protected function tearDown(): void
    {
        $this->removeApp(__DIR__ . '/../_fixtures/TestApp');
        $this->removeApp(__DIR__ . '/../_fixtures/TestAppTheme');
        $this->removePlugin(__DIR__ . '/../_fixtures/AppStoreTestPlugin');
    }

    public function testInstallExtension(): void
    {
        $this->installApp(__DIR__ . '/../_fixtures/TestApp', false);

        $this->lifecycleService->install('app', 'TestApp', $this->context);

        /** @var AppCollection $apps */
        
protected function setUp(): void
    {
        $this->extensionDataProvider = $this->getContainer()->get(AbstractExtensionDataProvider::class);
        $this->context = $this->createAdminStoreContext();

        $this->installApp(__DIR__ . '/../_fixtures/TestApp');
    }

    protected function tearDown(): void
    {
        $this->removeApp(__DIR__ . '/../_fixtures/TestApp');
    }

    public function testItReturnsInstalledAppsAsExtensionCollection(): void
    {
        $this->setLicenseDomain('localhost');
        $this->getRequestHandler()->reset();
        $this->getRequestHandler()->append(new Response(200, [], '[]'));

        $installedExtensions = $this->extensionDataProvider->getInstalledExtensions($this->context, true);
        $installedExtension = $installedExtensions->get('TestApp');

        
protected OrderTransactionEntity $orderTransaction;

    /** * @param mixed[] $queryParameters */
    public function __construct(
        OrderTransactionEntity $orderTransaction,
        protected array $queryParameters,
        protected ?RecurringDataStruct $recurring = null,
    ) {
        $this->orderTransaction = $this->removeApp($orderTransaction);
    }

    public function setSource(Source $source): void
    {
        $this->source = $source;
    }

    public function getSource(): Source
    {
        return $this->source;
    }

    

        $appPath = __DIR__ . '/../../Manifest/_fixtures/test';
        $this->installApp($appPath);

        static::assertSame(6, $this->fetchAppScriptCount());

        $scriptPersister = $this->getContainer()->get(ScriptPersister::class);

        $scriptPersister->refresh();

        static::assertSame(6, $this->fetchAppScriptCount());
        $this->removeApp($appPath);
    }

    private function fetchAppScriptCount(): int
    {
        return (int) $this->getContainer()->get(Connection::class)->fetchOne(
            'SELECT COUNT(id) FROM script'
        );
    }
}
protected function setUp(): void
    {
        $this->extensionLoader = $this->getContainer()->get(ExtensionLoader::class);

        $this->registerPlugin(__DIR__ . '/../_fixtures/AppStoreTestPlugin');
        $this->installApp(__DIR__ . '/../_fixtures/TestApp');
    }

    protected function tearDown(): void
    {
        $this->removePlugin(__DIR__ . '/../_fixtures/AppStoreTestPlugin');
        $this->removeApp(__DIR__ . '/../_fixtures/TestApp');
    }

    public function testAppNotInstalledDetectedAsTheme(): void
    {
        $this->installApp(__DIR__ . '/../_fixtures/TestAppTheme', false);
        $extensions = $this->extensionLoader->loadFromAppCollection(
            Context::createDefaultContext(),
            new AppCollection([])
        );

        /** @var ExtensionStruct $extension */
        
Home | Imprint | This part of the site doesn't use cookies.