protected function OrderStoreResolverTest::setUp in Commerce Core 8.2
Overrides OrderKernelTestBase::setUp
File
- modules/
order/ tests/ src/ Kernel/ OrderStoreResolverTest.php, line 33
Class
- OrderStoreResolverTest
- Tests the order store resolver.
Namespace
Drupal\Tests\commerce_order\KernelCode
protected function setUp() : void {
parent::setUp();
$this->store2 = $this
->createStore('Second store', 'admin2@example.com', 'online', FALSE);
$user = $this
->createUser();
/** @var \Drupal\commerce_order\Entity\Order $order */
$order = Order::create([
'type' => 'default',
'state' => 'draft',
'mail' => $user
->getEmail(),
'uid' => $user
->id(),
'ip_address' => '127.0.0.1',
'order_number' => '6',
'store_id' => $this->store2
->id(),
]);
$order
->save();
$this->order = $this
->reloadEntity($order);
}