You are here

protected function RoleEventTestBase::setUp in Ubercart 8.4

Overrides EventTestBase::setUp

File

uc_role/tests/src/Unit/Integration/Event/RoleEventTestBase.php, line 20

Class

RoleEventTestBase
Base class containing common code for uc_role event tests.

Namespace

Drupal\Tests\uc_role\Unit\Integration\Event

Code

protected function setUp() : void {
  parent::setUp();

  // Must enable our module to make our plugins discoverable.
  $this
    ->enableModule('uc_role', [
    'Drupal\\uc_role' => __DIR__ . '/../../../../../src',
  ]);

  // Tell the plugin manager where to look for plugins.
  $this->moduleHandler
    ->getModuleDirectories()
    ->willReturn([
    'uc_role' => __DIR__ . '/../../../../../',
  ]);

  // Create a real plugin manager with a mock moduleHandler.
  $this->eventManager = new RulesEventManager($this->moduleHandler
    ->reveal(), $this->entityTypeBundleInfo
    ->reveal());
}