You are here

protected function ConsumerConfigTest::setUp in farmOS 2.x

Overrides OauthTestBase::setUp

File

modules/core/api/tests/src/Functional/ConsumerConfigTest.php, line 26

Class

ConsumerConfigTest
Tests using the consumer.client_id field.

Namespace

Drupal\Tests\farm_api\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->tokenDebugUrl = Url::fromRoute('oauth2_token.user_debug');

  // Override the additional roles created by parent.
  $this->additionalRoles = [];
  for ($i = 0; $i < 4; $i++) {
    $role = Role::create([
      'id' => 'scope_' . $i,
      'label' => 'Scope: ' . $i,
      'is_admin' => FALSE,
    ]);
    $role
      ->save();
    $this->additionalRoles[] = $role;
  }
}