$progress =
$this->
import( $context,
PropertyGroupOptionDefinition::ENTITY_NAME,
'/fixtures/properties.csv',
'properties.csv',
$clonedPropertyProfile->
getId() );
// import should fail even if all system required fields are set,
// there are rows that have no values for user required fields.
// Input CSV is the same as in the 'importPropertyCsv' test (which previously succeeded here).
static::
assertImportExportFailed($progress);
static::
assertSame(0,
$progress->
getProcessedRecords());
// check the errors
$invalid =
$this->
getInvalidLogContent($progress->
getInvalidRecordsLogId());
static::
assertGreaterThanOrEqual(1, \
count($invalid)); // there could already be other errors
$first =
$invalid[0
];
static::
assertStringContainsString('media_url is set to required by the user but has no value',
$first['_error'
]);
} /**
* @group slow
*/