protected function OrderAdminTest::setUp in Commerce Core 8.2
Overrides OrderWebDriverTestBase::setUp
File
- modules/
order/ tests/ src/ FunctionalJavascript/ OrderAdminTest.php, line 53
Class
- OrderAdminTest
- Tests the order admin UI.
Namespace
Drupal\Tests\commerce_order\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
$this->store
->set('billing_countries', [
'FR',
'US',
]);
$this->store
->save();
$this->defaultProfile = Profile::create([
'type' => 'customer',
'uid' => $this->adminUser,
'address' => $this->defaultAddress,
]);
$this->defaultProfile
->save();
// Create a product variation.
$this->secondVariation = $this
->createEntity('commerce_product_variation', [
'type' => 'default',
'sku' => $this
->randomMachineName(),
'price' => [
'number' => 5.55,
'currency_code' => 'USD',
],
]);
$product = $this->variation
->getProduct();
$product
->addVariation($this->secondVariation);
$product
->save();
}