verifyDomain example

public function testVerifyDomain(): void
    {
        $this->firstRunWizardService->expects(static::once())
            ->method('verifyLicenseDomain');

        $frwController = new FirstRunWizardController(
            $this->firstRunWizardService,
            new StaticEntityRepository([]),
            new StaticEntityRepository([]),
        );

        $response = $frwController->verifyDomain(new QueryDataBag([
            'domain' => 'test-domain.com',
            'testEnvironment' => 'false',
        ])$this->createContext());
        $responseData = $this->decodeJsonResponse($response);

        static::assertArrayHasKey('data', $responseData);
    }

    public function testVerifyDomainWithoutDomain(): void
    {
        $this->firstRunWizardService->expects(static::once())
            
'id' => 123456,
                    'domain' => 'shopware.swag',
                    'verified' => true,
                    'edition' => [
                        'name' => 'Community Edition',
                        'label' => 'Community Edition',
                    ],
                ],
            ], \JSON_THROW_ON_ERROR),
        ));

        $this->frwController->verifyDomain(
            new QueryDataBag([
                'domain' => 'shopware.swag',
                'testEnvironment' => true,
            ]),
            $context,
        );

        static::assertEquals(
            'shopware.swag',
            $this->getContainer()->get(SystemConfigService::class)->getString(StoreRequestOptionsProvider::CONFIG_KEY_STORE_LICENSE_DOMAIN)
        );
    }
$fileSystem->dumpFile($filePath$fileContent);
        } catch (Exception $e) {
            $this->View()->assign([
                'success' => false,
                'message' => $e->getMessage(),
            ]);

            return;
        }

        try {
            $accountManagerService->verifyDomain($domain$this->getVersion()$token);
        } catch (Exception $e) {
            $this->View()->assign([
                'success' => false,
                'message' => $e->getMessage(),
            ]);
            $fileSystem->remove($rootDir . DIRECTORY_SEPARATOR . $filename);

            return;
        }

        try {
            
Home | Imprint | This part of the site doesn't use cookies.