public function ChainOrderTypeResolverTest::testOrderTypeResolution in Commerce Core 8.2
Tests resolving the order type.
File
- modules/
order/ tests/ src/ Kernel/ ChainOrderTypeResolverTest.php, line 17
Class
- ChainOrderTypeResolverTest
- Tests the chain order type resolver.
Namespace
Drupal\Tests\commerce_order\KernelCode
public function testOrderTypeResolution() {
$order_item = OrderItem::create([
'type' => 'test',
]);
$order_item
->save();
$resolver = $this->container
->get('commerce_order.chain_order_type_resolver');
$order_type = $resolver
->resolve($order_item);
$this
->assertEquals('default', $order_type);
}