Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
integration
testsuite
Magento
Customer
Fixtures
customer_2_addresses.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
use
Magento\Customer\Api\AddressRepositoryInterface
;
9
use
Magento\Customer\Api\Data\AddressInterface
;
10
use
Magento\TestFramework\Helper\Bootstrap
;
11
12
require
__DIR__
.
'/../../Customer/_files/customer.php'
;
13
14
$objectManager
= Bootstrap::getObjectManager();
15
16
$addressData
= include
__DIR__
.
'/address_data.php'
;
17
19
$repository
=
$objectManager
->get(AddressRepositoryInterface::class);
20
foreach
(
$addressData
as
$data
) {
22
$address
=
$objectManager
->create(AddressInterface::class, [
'data'
=>
$data
]);
23
$address
->setCustomerId(
$customer
->getId());
24
$repository
->save(
$address
);
25
}
$customer
$customer
Definition:
customers.php:11
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
Magento\Customer\Api\Data\AddressInterface
Definition:
AddressInterface.php:15
$address
$address
Definition:
customer.php:38
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
$addressData
$addressData
Definition:
customer_2_addresses.php:16
$objectManager
$objectManager
Definition:
customer_2_addresses.php:14
$repository
$repository
Definition:
customer_2_addresses.php:19
Magento\Customer\Api\AddressRepositoryInterface
Definition:
AddressRepositoryInterface.php:14