Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
customer_sec_website.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
11 
12 require __DIR__ . '/../../Store/_files/websites_different_countries.php';
13 
14 $objectManager = Bootstrap::getObjectManager();
15 
17 $customer = $objectManager->create(CustomerInterface::class);
18 $customer->setWebsiteId($websiteId)
19  ->setEmail('[email protected]')
20  ->setGroupId(1)
21  ->setStoreId($store->getId())
22  ->setFirstname('John')
23  ->setLastname('Doe')
24  ->setGender(1);
25 
27 $repository = $objectManager->get(CustomerRepositoryInterface::class);
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60