/** @var CustomerCollection $result */
$result =
$repository->
search($criteria, Context::
createDefaultContext())->
getEntities();
static::
assertCount(3,
$result);
static::
assertTrue($result->
has('0a1dea4bd2de43929ac210fd17339dde'
));
$customerWithMultipleAddresses =
$result->
get('0a1dea4bd2de43929ac210fd17339dde'
);
static::
assertInstanceOf(CustomerAddressCollection::
class,
$customerWithMultipleAddresses->
getAddresses());
static::
assertCount(4,
$customerWithMultipleAddresses->
getAddresses());
static::
assertInstanceOf(CustomerAddressEntity::
class,
$customerWithMultipleAddresses->
getDefaultBillingAddress());
static::
assertSame('shopware AG',
$customerWithMultipleAddresses->
getDefaultBillingAddress()->
getCompany());
static::
assertTrue($result->
has('f3bb913bc8cc48479c3834a75e82920b'
));
$customerWithUpdatedAddresses =
$result->
get('f3bb913bc8cc48479c3834a75e82920b'
);
static::
assertInstanceOf(CustomerAddressCollection::
class,
$customerWithUpdatedAddresses->
getAddresses());
static::
assertCount(2,
$customerWithUpdatedAddresses->
getAddresses());
static::
assertInstanceOf(CustomerAddressEntity::
class,
$customerWithUpdatedAddresses->
getDefaultShippingAddress());
static::
assertSame('shopware AG',
$customerWithUpdatedAddresses->
getDefaultShippingAddress()->
getCompany());
$progress =
$this->
export($context, CustomerDefinition::ENTITY_NAME
);