You are here

protected function RngEventAccessTest::setUp in RNG - Events and Registrations 3.x

Same name in this branch
  1. 3.x src/Tests/RngEventAccessTest.php \Drupal\rng\Tests\RngEventAccessTest::setUp()
  2. 3.x tests/src/Kernel/RngEventAccessTest.php \Drupal\Tests\rng\Kernel\RngEventAccessTest::setUp()
Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/RngEventAccessTest.php \Drupal\Tests\rng\Kernel\RngEventAccessTest::setUp()
  2. 8 tests/src/Kernel/RngEventAccessTest.php \Drupal\Tests\rng\Kernel\RngEventAccessTest::setUp()

Overrides RngKernelTestBase::setUp

File

tests/src/Kernel/RngEventAccessTest.php, line 74

Class

RngEventAccessTest
Tests manage event access control. to register for events..

Namespace

Drupal\Tests\rng\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this->routeProvider = $this->container
    ->get('router.route_provider');
  $this->accessManager = $this->container
    ->get('access_manager');
  $this->eventManager = $this->container
    ->get('rng.event_manager');
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('rng_rule');
  $this
    ->installEntitySchema('rng_rule_component');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this->registrationType = $this
    ->createRegistrationType();
  $this->eventType = $this
    ->createEventType('entity_test', 'entity_test');

  // Make sure no users get uid=1.
  $root = $this
    ->drupalCreateUser();
}