protected function CouponTest::setUp in Commerce Core 8.2
Same name in this branch
- 8.2 modules/promotion/tests/src/Functional/CouponTest.php \Drupal\Tests\commerce_promotion\Functional\CouponTest::setUp()
- 8.2 modules/promotion/tests/src/Kernel/Entity/CouponTest.php \Drupal\Tests\commerce_promotion\Kernel\Entity\CouponTest::setUp()
Overrides CommerceBrowserTestBase::setUp
File
- modules/
promotion/ tests/ src/ Functional/ CouponTest.php, line 48
Class
- CouponTest
- Tests the admin UI for coupons.
Namespace
Drupal\Tests\commerce_promotion\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->promotion = $this
->createEntity('commerce_promotion', [
'name' => 'Promotion test',
'order_types' => [
'default',
],
'stores' => [
$this->store
->id(),
],
'offer' => [
'target_plugin_id' => 'order_percentage_off',
'target_plugin_configuration' => [
'percentage' => '0.10',
],
],
'start_date' => '2017-01-01',
'status' => TRUE,
]);
}