You are here

protected function ShipmentSaveEventTest::setUp in Ubercart 8.4

Overrides EventTestBase::setUp

File

shipping/uc_fulfillment/tests/src/Unit/Integration/Event/ShipmentSaveEventTest.php, line 22

Class

ShipmentSaveEventTest
Checks that the event "uc_fulfillment_shipment_save" is correctly defined.

Namespace

Drupal\Tests\uc_fulfillment\Unit\Integration\Event

Code

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

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

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

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