You are here

public function ProductVariationTest::testGetters in Commerce Recurring Framework 8

@covers ::getLabel @covers ::getPurchasableEntityTypeId

File

tests/src/Kernel/Plugin/Commerce/SubscriptionType/ProductVariationTest.php, line 24

Class

ProductVariationTest
Tests the product variation subscription type.

Namespace

Drupal\Tests\commerce_recurring\Kernel\Plugin\Commerce\SubscriptionType

Code

public function testGetters() {
  $plugin_manager = $this->container
    ->get('plugin.manager.commerce_subscription_type');

  /** @var \Drupal\commerce_recurring\Plugin\Commerce\SubscriptionType\SubscriptionTypeInterface $plugin */
  $plugin = $plugin_manager
    ->createInstance('product_variation');
  $this
    ->assertEquals('Product variation', $plugin
    ->getLabel());
  $this
    ->assertEquals('commerce_product_variation', $plugin
    ->getPurchasableEntityTypeId());
}