protected function OrderFixedAmountOffTest::setUp in Commerce Core 8.2
Overrides OrderKernelTestBase::setUp
File
- modules/
promotion/ tests/ src/ Kernel/ Plugin/ Commerce/ PromotionOffer/ OrderFixedAmountOffTest.php, line 39
Class
- OrderFixedAmountOffTest
- Tests the fixed amount off offer for orders.
Namespace
Drupal\Tests\commerce_promotion\Kernel\Plugin\Commerce\PromotionOfferCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_promotion');
$this
->installConfig([
'commerce_promotion',
]);
$this
->installSchema('commerce_promotion', [
'commerce_promotion_usage',
]);
$this->order = Order::create([
'type' => 'default',
'state' => 'completed',
'mail' => 'test@example.com',
'ip_address' => '127.0.0.1',
'order_number' => '6',
'uid' => $this
->createUser(),
'store_id' => $this->store,
'order_items' => [],
]);
}