function EventPropertyAccessTest::setUp
Overrides EventTestBase::setUp
File
-
tests/
src/ Unit/ Integration/ Event/ EventPropertyAccessTest.php, line 21
Class
- EventPropertyAccessTest
- Checks that the events defined in the rules_test_event module are correct.
Namespace
Drupal\Tests\rules\Unit\Integration\EventCode
protected function setUp() : void {
parent::setUp();
// Must enable our test module to make its plugins discoverable.
$this->enableModule('rules_test_event', [
'Drupal\\rules_test_event' => __DIR__ . '/../../../../modules/rules_test_event/src',
]);
// Tell the plugin manager where to look for plugins.
$this->moduleHandler
->getModuleDirectories()
->willReturn([
'rules_test_event' => __DIR__ . '/../../../../modules/rules_test_event/',
]);
// Create a real plugin manager with a mock moduleHandler.
$this->eventManager = new RulesEventManager($this->moduleHandler
->reveal(), $this->entityTypeBundleInfo
->reveal());
}