cleanDefaultSalesChannelDomain example

private EntityRepository $seoUrlRepository;

    private EntityRepository $salesChannelDomainRepository;

    private SalesChannelContext $salesChannelContext;

    private HreflangLoaderInterface $hreflangLoader;

    protected function setUp(): void
    {
        parent::setUp();
        $this->cleanDefaultSalesChannelDomain();

        $this->seoUrlRepository = $this->getContainer()->get('seo_url.repository');

        $this->salesChannelDomainRepository = $this->getContainer()->get('sales_channel_domain.repository');

        $contextFactory = $this->getContainer()->get(SalesChannelContextFactory::class);
        $this->salesChannelContext = $contextFactory->create('', TestDefaults::SALES_CHANNEL);

        $this->hreflangLoader = $this->getContainer()->get(HreflangLoaderInterface::class);

        $this->createProducts();
    }

    private $orderRepository;

    protected function setUp(): void
    {
        parent::setUp();

        $this->orderService = $this->getContainer()->get(OrderService::class);

        $this->orderRepository = $this->getContainer()->get('order.repository');

        $this->cleanDefaultSalesChannelDomain();
        $this->addCountriesToSalesChannel();

        $contextFactory = $this->getContainer()->get(SalesChannelContextFactory::class);
        $this->salesChannelContext = $contextFactory->create(
            '',
            TestDefaults::SALES_CHANNEL,
            [SalesChannelContextService::CUSTOMER_ID => $this->createCustomer('Jon', 'Doe')]
        );
    }

    public function testOrderDeliveryStateTransition(): void
    {
Home | Imprint | This part of the site doesn't use cookies.