You are here

protected function NoJavaScriptAnonymousTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Common/NoJavaScriptAnonymousTest.php \Drupal\Tests\system\Functional\Common\NoJavaScriptAnonymousTest::setUp()
  2. 9 core/modules/system/tests/src/Functional/Common/NoJavaScriptAnonymousTest.php \Drupal\Tests\system\Functional\Common\NoJavaScriptAnonymousTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/Common/NoJavaScriptAnonymousTest.php, line 68

Class

NoJavaScriptAnonymousTest
Tests that anonymous users are not served any JavaScript.

Namespace

Drupal\Tests\system\Functional\Common

Code

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

  // Grant the anonymous user the permission to look at user profiles.
  user_role_grant_permissions('anonymous', [
    'access user profiles',
  ]);
}