$data =
$this->
prepareImportExportProfileTestData($num);
// do API calls
foreach ($data as $entry) { $this->
getBrowser()->
request('POST',
$this->
prepareRoute(),
[],
[],
[],
json_encode($entry, \JSON_THROW_ON_ERROR
));
$response =
$this->
getBrowser()->
getResponse();
static::
assertSame(Response::HTTP_NO_CONTENT,
$response->
getStatusCode(),
$response->
getContent());
} // read created data from db
$records =
$this->connection->
fetchAllAssociative('SELECT * FROM import_export_profile'
);
$translationRecords =
$this->
getTranslationRecords();
// compare expected and resulting data
static::
assertCount($num,
$records);
foreach ($records as $record) { $expect =
$data[$record['id'
]];
static::
assertSame($expect['name'
],
$record['name'
]);
static::
assertSame($expect['label'
],
$translationRecords[$record['id'
]]['label'
]);
static::
assertEquals($expect['systemDefault'
],
(bool) $record['system_default'
]);
static::
assertSame($expect['sourceEntity'
],
$record['source_entity'
]);
static::
assertSame($expect['fileType'
],
$record['file_type'
]);
static::
assertSame($expect['delimiter'
],
$record['delimiter'
]);