You are here

PriceListKernelTestBase.php in Commerce Pricelist 8

Same filename and directory in other branches
  1. 8.2 tests/src/Kernel/PriceListKernelTestBase.php

File

tests/src/Kernel/PriceListKernelTestBase.php
View source
<?php

namespace Drupal\Tests\commerce_pricelist\Kernel;

use Drupal\Tests\commerce\Kernel\CommerceKernelTestBase;

/**
 * Provides a base class for Commerce kernel tests.
 */
abstract class PriceListKernelTestBase extends CommerceKernelTestBase {

  /**
   * Modules to enable.
   *
   * Note that when a child class declares its own $modules list, that list
   * doesn't override this one, it just extends it.
   *
   * @var array
   */
  public static $modules = [
    'path',
    'commerce_product',
    'commerce_pricelist',
  ];

  /**
   * A sample user.
   *
   * @var \Drupal\user\UserInterface
   */
  protected $user;

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this
      ->installEntitySchema('commerce_product_variation');
    $this
      ->installEntitySchema('commerce_product');
    $this
      ->installEntitySchema('price_list_item');
    $this
      ->installEntitySchema('price_list');
    $this
      ->installConfig([
      'commerce_product',
      'commerce_pricelist',
    ]);
    $user = $this
      ->createUser();
    $this->user = $this
      ->reloadEntity($user);
  }

}

Classes

Namesort descending Description
PriceListKernelTestBase Provides a base class for Commerce kernel tests.