getExpireDate example

$config = $this->logEntity->getConfig();
            $config['mapping'][] = [
                'key' => '_error',
                'mappedKey' => '_error',
            ];
            $config = new Config($config['mapping']$config['parameters'] ?? []$config['updateBy'] ?? []);

            if ($this->logEntity->getProfileId() !== null) {
                $failedImportLogEntity = $this->importExportService->prepareExport(
                    $context,
                    $this->logEntity->getProfileId(),
                    $file->getExpireDate(),
                    $newName,
                    $config->jsonSerialize(),
                    $newPath,
                    ImportExportLogEntity::ACTIVITY_INVALID_RECORDS_EXPORT
                );

                $this->logEntity->setInvalidRecordsLog($failedImportLogEntity);
                $this->logEntity->setInvalidRecordsLogId($failedImportLogEntity->getId());
            }
        }

        
$data = $this->prepareImportExportFileTestData($num);

        $this->repository->create(array_values($data)$this->context);

        foreach ($data as $expect) {
            $id = $expect['id'];
            $result = $this->repository->search(new Criteria([$id])$this->context);
            $importExportFile = $result->get($id);
            static::assertEquals(1, $result->count());
            static::assertEquals($expect['originalName']$importExportFile->getOriginalName());
            static::assertEquals($expect['path']$importExportFile->getPath());
            static::assertEquals(new \DateTime($expect['expireDate'])$importExportFile->getExpireDate());
            static::assertEquals($expect['size']$importExportFile->getSize());
            static::assertEquals($expect['accessToken']$importExportFile->getAccessToken());
        }
    }

    public function testImportExportFileReadNoResult(): void
    {
        $num = 3;
        $data = $this->prepareImportExportFileTestData($num);

        $this->repository->create(array_values($data)$this->context);

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