onLicenseHostChanged example

public function testIsSubscribedToSystemConfigChangedEvents(): void
    {
        static::assertArrayHasKey(SystemConfigChangedEvent::class$this->subscriber->getSubscribedEvents());
        static::assertEquals('onLicenseHostChanged', $this->subscriber->getSubscribedEvents()[SystemConfigChangedEvent::class]);
    }

    public function testOnlyHandlesLicenseHostChangedEvents(): void
    {
        $event = new SystemConfigChangedEvent('random.config.key', null, null);

        $this->subscriber->onLicenseHostChanged($event);
    }

    public function testDeletesShopSecretAndLogsOutAllUsers(): void
    {
        $context = Context::createDefaultContext();

        $systemConfigService = $this->getContainer()->get(SystemConfigService::class);
        $systemConfigService->set('core.store.shopSecret', 'shop-s3cr3t');

        /** @var EntityRepository $userRepository */
        $userRepository = $this->getContainer()->get('user.repository');

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