You are here

protected function CartRulesEventsTest::setUp in Ubercart 8.4

Overrides UbercartBrowserTestBase::setUp

File

uc_cart/tests/src/Functional/CartRulesEventsTest.php, line 37

Class

CartRulesEventsTest
Tests the three events that uc_cart provides for use in Rules module.

Namespace

Drupal\Tests\uc_cart\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->adminUser = $this
    ->drupalCreateUser([
    'access administration pages',
    'access content',
    'view all orders',
    'delete orders',
    'edit orders',
  ]);

  // All of the events we're testing are or can be initiated
  // by an administrator's actions.
  $this
    ->drupalLogin($this->adminUser);
  $this->rulesStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('rules_reaction_rule');
  $this->expressionManager = $this->container
    ->get('plugin.manager.rules_expression');
}