You are here

protected function ProductLoadEventTest::setUp in Ubercart 8.4

Overrides EventTestBase::setUp

File

uc_product/tests/src/Unit/Integration/Event/ProductLoadEventTest.php, line 22

Class

ProductLoadEventTest
Checks that the event "uc_product_load" is correctly defined.

Namespace

Drupal\Tests\uc_product\Unit\Integration\Event

Code

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

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

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

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