You are here

protected function ConsumerConfigTest::getClientRoleIds in farmOS 2.x

Helper function to get role IDs the client has.

Return value

array Array of role IDs.

3 calls to ConsumerConfigTest::getClientRoleIds()
ConsumerConfigTest::testGrantUserAccess in modules/core/api/tests/src/Functional/ConsumerConfigTest.php
Test consumer.grant_user_access config.
ConsumerConfigTest::testLimitRequestedAccess in modules/core/api/tests/src/Functional/ConsumerConfigTest.php
Test consumer.limit_requested_access.
ConsumerConfigTest::testLimitUserAccess in modules/core/api/tests/src/Functional/ConsumerConfigTest.php
Test consumer.limit_user_access.

File

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

Class

ConsumerConfigTest
Tests using the consumer.client_id field.

Namespace

Drupal\Tests\farm_api\Functional

Code

protected function getClientRoleIds() {
  return array_map(function ($role) {
    return $role['target_id'];
  }, $this->client
    ->get('roles')
    ->getValue());
}