function RouteProviderTest::setUp
Overrides KernelTestBase::setUp
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Entity/ RouteProviderTest.php, line 31 
Class
- RouteProviderTest
- Tests route providers for entity types.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function setUp() : void {
  parent::setUp();
  $this->setUpCurrentUser([
    'uid' => 1,
  ]);
  $this->installEntitySchema('entity_test_mul');
  $this->installEntitySchema('entity_test_admin_routes');
  /** @var \Drupal\user\RoleInterface $role */
  $role = Role::create([
    'id' => RoleInterface::ANONYMOUS_ID,
    'label' => 'Anonymous',
  ]);
  $role->grantPermission('administer entity_test content')
    ->grantPermission('view test entity');
  $role->save();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
