protected function EventTestBase::setUp in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 tests/src/Unit/EventTestBase.php \Drupal\Tests\radioactivity\Unit\EventTestBase::setUp()
File
- tests/
src/ Unit/ EventTestBase.php, line 20
Class
- EventTestBase
- Base class containing common code for radioactivity event tests.
Namespace
Drupal\Tests\radioactivity\UnitCode
protected function setUp() : void {
parent::setUp();
// Must enable our module to make our plugins discoverable.
$this
->enableModule('radioactivity', [
'Drupal\\radioactivity' => __DIR__ . '/../../../src',
]);
// Tell the plugin manager where to look for plugins.
$this->moduleHandler
->getModuleDirectories()
->willReturn([
'radioactivity' => __DIR__ . '/../../../',
]);
// Create a real plugin manager with a mock moduleHandler.
$this->eventManager = new RulesEventManager($this->moduleHandler
->reveal(), $this->entityTypeBundleInfo
->reveal());
}