You are here

protected function AuthenticationAnonymousTest::setUp in Entity Share 8.3

Overrides EntityShareClientFunctionalTestBase::setUp

File

modules/entity_share_client/tests/src/Functional/AuthenticationAnonymousTest.php, line 24

Class

AuthenticationAnonymousTest
Functional test class for import with "Anonymous" authorization.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function setUp() : void {
  parent::setUp();
  Role::load(AccountInterface::ANONYMOUS_ROLE)
    ->grantPermission('entity_share_server_access_channels')
    ->save();
  foreach ($this->channels as $channel) {
    $channel
      ->set('authorized_users', [
      'anonymous',
    ]);
    $channel
      ->save();
  }
  $this
    ->postSetupFixture();
}