clearProductExports example

$newExport = $this->productExportRepository->search(new Criteria([$exportId])$this->context)->first();
        static::assertNotNull($newExport);
        static::assertEquals($previousGeneratedAt$newExport->getGeneratedAt());
    }

    /** * @group quarantined */
    public function testGeneratedAtAndIntervalsAreRespected(): void
    {
        $this->createProductStream();
        $this->clearProductExports();

        $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC'));

        // Create one ProductExport, last exported 30 days ago, to be exported every hour         $this->createTestEntity($now->sub(new \DateInterval('P30M')), 3600, 'Testexport.csv');

        // Create a second ProductExport, last exported 30 minutes ago, to be exported every hour         $this->createTestEntity($now->sub(new \DateInterval('PT30M')), 3600, 'Testexport1.csv');

        /** @var TraceableMessageBus $bus */
        $bus = $this->getContainer()->get('messenger.bus.shopware');
        
Home | Imprint | This part of the site doesn't use cookies.