getProfileId example

$newName = $pathInfo['filename'] . '_failed.' . ($pathInfo['extension'] ?? '');

            $newPath = $file->getPath() . '_invalid';

            $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->logRepository->create(array_values($data)$this->context);

        foreach ($data as $expect) {
            $id = $expect['id'];
            $result = $this->logRepository->search(new Criteria([$id])$this->context);
            /** @var ImportExportLogEntity $ImportExportLog */
            $ImportExportLog = $result->get($id);
            static::assertCount(1, $result);
            static::assertSame($expect['activity']$ImportExportLog->getActivity());
            static::assertSame($expect['state']$ImportExportLog->getState());
            static::assertSame($expect['userId']$ImportExportLog->getUserId());
            static::assertSame($expect['profileId']$ImportExportLog->getProfileId());
            static::assertSame($expect['fileId']$ImportExportLog->getFileId());
            static::assertSame($expect['username']$ImportExportLog->getUsername());
            static::assertSame($expect['profileName']$ImportExportLog->getProfileName());
        }
    }

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

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