importCategoryCsv example

$logfile = $this->getLogEntity($progress->getLogId())->getFile();
        static::assertInstanceOf(ImportExportFileEntity::class$logfile);
        $csv = $filesystem->read($logfile->getPath());
        static::assertIsString($csv);
        static::assertStringContainsString(";{$newStock};", $csv);
    }

    public function testImportEvents(): void
    {
        $this->listener->addSubscriber(new TestSubscriber());
        $this->importCategoryCsv();
        $events = array_column($this->listener->getCalledListeners(), 'event');

        static::assertContains(ImportExportBeforeImportRecordEvent::class$events);
        static::assertContains(ImportExportAfterImportRecordEvent::class$events);
        static::assertNotContains(ImportExportExceptionImportRecordEvent::class$events);
    }

    public function testImportExport(): void
    {
        /** @var FilesystemOperator $filesystem */
        $filesystem = $this->getContainer()->get('shopware.filesystem.private');

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