protected function CartEventTestBase::setUp in Ubercart 8.4
Overrides EventTestBase::setUp
File
- uc_cart/
tests/ src/ Unit/ Integration/ Event/ CartEventTestBase.php, line 20
Class
- CartEventTestBase
- Base class containing common code for uc_cart event tests.
Namespace
Drupal\Tests\uc_cart\Unit\Integration\EventCode
protected function setUp() : void {
parent::setUp();
// Must enable our module to make our plugins discoverable.
$this
->enableModule('uc_cart', [
'Drupal\\uc_cart' => __DIR__ . '/../../../../../src',
]);
// Tell the plugin manager where to look for plugins.
$this->moduleHandler
->getModuleDirectories()
->willReturn([
'uc_cart' => __DIR__ . '/../../../../../',
]);
// Create a real plugin manager with a mock moduleHandler.
$this->eventManager = new RulesEventManager($this->moduleHandler
->reveal(), $this->entityTypeBundleInfo
->reveal());
}