protected function PromotionOrderProcessorTest::setUp in Commerce Core 8.2
Overrides OrderKernelTestBase::setUp
File
- modules/
promotion/ tests/ src/ Kernel/ PromotionOrderProcessorTest.php, line 41
Class
- PromotionOrderProcessorTest
- Tests the promotion order processor.
Namespace
Drupal\Tests\commerce_promotion\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_promotion');
$this
->installEntitySchema('commerce_promotion_coupon');
$this
->installConfig([
'commerce_promotion',
]);
$this
->installSchema('commerce_promotion', [
'commerce_promotion_usage',
]);
ConfigurableLanguage::createFromLangcode('fr')
->save();
$this->user = $this
->createUser();
$this->order = Order::create([
'type' => 'default',
'state' => 'completed',
'mail' => 'test@example.com',
'ip_address' => '127.0.0.1',
'order_number' => '6',
'store_id' => $this->store,
'uid' => $this->user,
'order_items' => [],
]);
}