You are here

protected function ApigeeMockApiClientHelperTrait::queueDevsInCompanyResponse in Apigee Edge 8

Queues up a mock developers in a company response.

Parameters

array $developers: An array of arrays containing developer emails and roles.

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

3 calls to ApigeeMockApiClientHelperTrait::queueDevsInCompanyResponse()
ApigeeMockApiClientHelperTrait::addUserToTeam in tests/modules/apigee_mock_api_client/tests/src/Traits/ApigeeMockApiClientHelperTrait.php
Adds a user to a team.
DeveloperTest::developerGetCompanyListTest in tests/src/Functional/DeveloperTest.php
Tests getCompanies() and hasCompany() methods on the developer entity.
TeamInvitationsTest::testMultipleInvitations in modules/apigee_edge_teams/tests/src/Functional/TeamInvitationsTest.php
Tests that an email can be invited to one or more teams.

File

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

Class

ApigeeMockApiClientHelperTrait
Helper functions working with Apigee tests.

Namespace

Drupal\Tests\apigee_mock_api_client\Traits

Code

protected function queueDevsInCompanyResponse(array $developers, $response_code = NULL) {
  $context = empty($response_code) ? [] : [
    'status_code' => $response_code,
  ];
  $context['developers'] = $developers;
  $this->stack
    ->queueMockResponse([
    'developers_in_company' => $context,
  ]);
}