fetchVerificationInfo example

'json' => [
                        'domain' => 'shopware.swag',
                    ],
                    'query' => [],
                ],
            ],
            $verificationInfo
        );

        static::assertEquals(
            $verificationInfo,
            $frwClient->fetchVerificationInfo('shopware.swag', $this->context)
        );
    }

    /** * @param array{string, string, array{headers?: array<string, string>, query?: array<string, string>, json?: array<mixed>}} $requestParams * @param array<mixed> $responseBody */
    private function createFrwClient(array $requestParams, array $responseBody): FirstRunWizardClient
    {
        $client = $this->createMock(ClientInterface::class);
        $client->expects(static::once())
            
 $licenseDomains);

        return new LicenseDomainCollection($domains);
    }

    public function verifyLicenseDomain(string $domain, Context $context, bool $testEnvironment = false): LicenseDomainStruct
    {
        $domains = $this->getLicenseDomains($context);

        $existing = $domains->get($domain);
        if (!$existing || !$existing->isVerified()) {
            $secretResponse = $this->frwClient->fetchVerificationInfo($domain$context);
            $secret = new DomainVerificationRequestStruct($secretResponse['content']$secretResponse['fileName']);
            $this->storeVerificationSecret($domain$secret);
            $this->frwClient->checkVerificationSecret($domain$context$testEnvironment);

            $domains = $this->getLicenseDomains($context);
            $existing = $domains->get($domain);
        }

        if (!$existing || !$existing->isVerified()) {
            throw new LicenseDomainVerificationException($domain);
        }
        
Home | Imprint | This part of the site doesn't use cookies.