protected function PromotionConditionTest::setUp in Commerce Core 8.2
Overrides OrderKernelTestBase::setUp
File
- modules/
promotion/ tests/ src/ Kernel/ PromotionConditionTest.php, line 40
Class
- PromotionConditionTest
- Tests promotion conditions.
Namespace
Drupal\Tests\commerce_promotion\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_promotion');
$this
->installConfig([
'commerce_promotion',
]);
$this
->installSchema('commerce_promotion', [
'commerce_promotion_usage',
]);
$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' => $user
->id(),
'order_items' => [],
]);
}