You are here

protected function EmitControllerEndpointTest::setUp in Radioactivity 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/EmitControllerEndpointTest.php \Drupal\Tests\radioactivity\Kernel\EmitControllerEndpointTest::setUp()

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/EmitControllerEndpointTest.php, line 27

Class

EmitControllerEndpointTest
Tests the Radioactivity Emit Controller Endpoint.

Namespace

Drupal\Tests\radioactivity\Kernel

Code

protected function setUp() : void {
  parent::setUp();

  // Give anonymous users permission to access content, so the emit endpoint
  // can be reached.
  $this
    ->installConfig([
    'user',
  ]);
  $anonymous_role = Role::load(Role::ANONYMOUS_ID);
  $anonymous_role
    ->grantPermission('access content');
  $anonymous_role
    ->save();
}