protected function OrderPaidSubscriberTest::setUp in Commerce Core 8.2
Overrides OrderKernelTestBase::setUp
File
- modules/
payment/ tests/ src/ Kernel/ OrderPaidSubscriberTest.php, line 41
Class
- OrderPaidSubscriberTest
- Tests the OrderPaidSubscriber.
Namespace
Drupal\Tests\commerce_payment\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_payment');
$this
->installConfig('commerce_payment');
$order_item = OrderItem::create([
'type' => 'test',
'quantity' => 1,
'unit_price' => new Price('10', 'USD'),
]);
$order_item
->save();
$this->order = Order::create([
'type' => 'default',
'store_id' => $this->store,
'order_items' => [
$order_item,
],
'state' => 'draft',
'payment_gateway' => 'onsite',
]);
$this->order
->save();
}