You are here

protected function ApigeeMockApiClientHelperTrait::queueDeveloperResponse in Apigee Edge 8

Queues up a mock developer response.

Parameters

\Drupal\user\UserInterface $developer: The developer user to get properties from.

string|null $response_code: Add a response code to override the default.

array $context: Extra keys to pass to the template.

26 calls to ApigeeMockApiClientHelperTrait::queueDeveloperResponse()
ApigeeEdgeActionsRulesKernelTestBase::setUp in modules/apigee_edge_actions/tests/src/Kernel/ApigeeEdgeActionsRulesKernelTestBase.php
ApigeeMockApiClientHelperTrait::addUserToTeam in tests/modules/apigee_mock_api_client/tests/src/Traits/ApigeeMockApiClientHelperTrait.php
Adds a user to a team.
ApigeeMockApiClientHelperTrait::createDeveloperApp in tests/modules/apigee_mock_api_client/tests/src/Traits/ApigeeMockApiClientHelperTrait.php
Helper to create a DeveloperApp entity.
ApigeeMockApiClientHelperTrait::queueDeveloperResponseFromDeveloper in tests/modules/apigee_mock_api_client/tests/src/Traits/ApigeeMockApiClientHelperTrait.php
Queues up a mock developer response.
AppListBuilderTest::setUp in tests/src/Kernel/Entity/ListBuilder/AppListBuilderTest.php

... See full list

File

tests/modules/apigee_mock_api_client/tests/src/Traits/ApigeeMockApiClientHelperTrait.php, line 160

Class

ApigeeMockApiClientHelperTrait
Helper functions working with Apigee tests.

Namespace

Drupal\Tests\apigee_mock_api_client\Traits

Code

protected function queueDeveloperResponse(UserInterface $developer, $response_code = NULL, array $context = []) {
  if (!empty($response_code)) {
    $context['status_code'] = $response_code;
  }
  $context['developer'] = $developer;
  $context['org_name'] = $this->sdkConnector
    ->getOrganization();
  $this->stack
    ->queueMockResponse([
    'get_developer' => $context,
  ]);
}