Some items such as Assets and Client Organizations need to be related to other entities through a Connection, for example:
$this->superProviderIntegrityAdmin = UserFactory::getSuperProviderIntegrityAdmin($this->getContainer());
$this->parentOrganisation = OrganisationFactory::getSuperProviderOrganisation($this->getContainer());
$this->clientOrganisation = OrganisationFactory::getClientOrganisation(
container: $this->getContainer(),
faker: $this->getFaker(),
user: $this->superProviderIntegrityAdmin,
parentOrganisation: $this->parentOrganisation,
providers: []
);
$connection = ConnectionFactory::getConnection(
container: $this->getContainer(),
user: $this->superProviderIntegrityAdmin,
client: $this->clientOrganisation,
provider: $this->parentOrganisation,
);
Or also:
$assetConnection = AssetConnectionFactory::getAssetConnection(
container: $this->getContainer(),
asset: $this->asset,
connection: $connection,
user: $this->superProviderIntegrityAdmin,
);