LicenseDomainVerificationException example


class LicenseDomainVerificationExceptionTest extends TestCase
{
    public function testGetErrorCode(): void
    {
        static::assertSame(
            'FRAMEWORK__STORE_LICENSE_DOMAIN_VALIDATION_FAILED',
            (new LicenseDomainVerificationException('license.domain'))->getErrorCode()
        );
    }

    public function testGetStatusCode(): void
    {
        static::assertSame(
            Response::HTTP_INTERNAL_SERVER_ERROR,
            (new LicenseDomainVerificationException('license.domain'))->getStatusCode()
        );
    }

    
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);
        }
        $existing->assign(['active' => true]);

        $this->configService->set(StoreService::CONFIG_KEY_STORE_LICENSE_DOMAIN, $domain);
        $this->configService->set(StoreService::CONFIG_KEY_STORE_LICENSE_EDITION, $existing->getEdition());

        return $existing;
    }

    private function setFrwStatus(FrwState $newState): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.