createAppRegistrationService example

#[Package('core')] class AppRegistrationServiceTest extends TestCase
{
    public function testDoesNotRegisterAtAppServerIfManifestHasNoSetup(): void
    {
        $manifest = Manifest::createFromXmlFile(__DIR__ . '/../_fixtures/manifest_no_setup.xml');

        $handshakeFactory = $this->createMock(HandshakeFactory::class);
        $handshakeFactory->expects(static::never())
            ->method('create');

        $appRegistrationService = $this->createAppRegistrationService();
        $appRegistrationService->registerApp($manifest, 'id', 's3cr3t-4cc3s-k3y', Context::createDefaultContext());
    }

    public function testThrowsAppRegistrationExceptionIfStoreHandshakeFails(): void
    {
        $manifest = Manifest::createFromXmlFile(__DIR__ . '/../_fixtures/manifest.xml');

        $handshake = new StoreHandshake(
            'https://shopware.swag',
            'http://app.server/register',
            'test',
            
Home | Imprint | This part of the site doesn't use cookies.