hasAppsThatNeedAppUrl example

'versionRevision' => $this->params->get('kernel.shopware_version_revision'),
            'adminWorker' => [
                'enableAdminWorker' => $this->params->get('shopware.admin_worker.enable_admin_worker'),
                'enableQueueStatsWorker' => $this->params->get('shopware.admin_worker.enable_queue_stats_worker'),
                'enableNotificationWorker' => $this->params->get('shopware.admin_worker.enable_notification_worker'),
                'transports' => $this->params->get('shopware.admin_worker.transports'),
            ],
            'bundles' => $this->getBundles(),
            'settings' => [
                'enableUrlFeature' => $this->enableUrlFeature,
                'appUrlReachable' => $this->appUrlVerifier->isAppUrlReachable($request),
                'appsRequireAppUrl' => $this->appUrlVerifier->hasAppsThatNeedAppUrl(),
                'private_allowed_extensions' => $this->params->get('shopware.filesystem.private_allowed_extensions'),
                'enableHtmlSanitizer' => $this->params->get('shopware.html_sanitizer.enabled'),
            ],
        ]);
    }

    #[Route(path: '/api/_info/version', name: 'api.info.shopware.version', methods: ['GET'])]     #[Route(path: '/api/v1/_info/version', name: 'api.info.shopware.version_old_version', methods: ['GET'])]     public function infoShopwareVersion(): JsonResponse
    {
        return new JsonResponse([
            
static::assertFalse($verifier->isAppUrlReachable($request));
    }

    public function testAppsThatNeedAppUrlReturnFalseWithoutAppsThatRequireRegistration(): void
    {
        $this->connection->expects(static::once())
            ->method('fetchOne')
            ->willReturn('0');

        $verifier = new AppUrlVerifier($this->guzzleMock, $this->connection, 'prod', false);

        static::assertFalse($verifier->hasAppsThatNeedAppUrl());
    }

    public function testAppsThatNeedAppUrlReturnTrueWithAppsThatRequireRegistration(): void
    {
        $this->connection->expects(static::once())
            ->method('fetchOne')
            ->willReturn('1');

        $verifier = new AppUrlVerifier($this->guzzleMock, $this->connection, 'prod', false);

        static::assertTrue($verifier->hasAppsThatNeedAppUrl());
    }
Home | Imprint | This part of the site doesn't use cookies.