$this->logRepository =
$this->
getContainer()->
get('import_export_log.repository'
);
$this->profileRepository =
$this->
getContainer()->
get('import_export_profile.repository'
);
$this->fileRepository =
$this->
getContainer()->
get('import_export_file.repository'
);
$this->userRepository =
$this->
getContainer()->
get('user.repository'
);
$this->connection =
$this->
getContainer()->
get(Connection::
class);
$this->context = Context::
createDefaultContext();
} public function testImportExportLogSingleCreateSuccess(): void
{ $data =
$this->
prepareImportExportLogTestData();
$id =
array_key_first($data);
$this->logRepository->
create([$data[$id]],
$this->context
);
$record =
$this->connection->
fetchAssociative('SELECT * FROM import_export_log WHERE id = :id',
['id' =>
$id]);
static::
assertIsArray($record);
$expect =
$data[$id];
static::
assertNotEmpty($record);
static::
assertEquals($id,
$record['id'
]);