protected function ApigeeMockApiClientHelperTrait::queueCompanyResponse in Apigee Edge 8
Queues up a mock company response.
Parameters
\Apigee\Edge\Api\Management\Entity\Company $company: The cpmpany to get properties from.
string|null $response_code: Add a response code to override the default.
6 calls to ApigeeMockApiClientHelperTrait::queueCompanyResponse()
- ApigeeMockApiClientHelperTrait::addUserToTeam in tests/
modules/ apigee_mock_api_client/ tests/ src/ Traits/ ApigeeMockApiClientHelperTrait.php - Adds a user to a team.
- ApigeeMockApiClientHelperTrait::createTeam in tests/
modules/ apigee_mock_api_client/ tests/ src/ Traits/ ApigeeMockApiClientHelperTrait.php - Helper to create a Team entity.
- DeveloperTest::developerGetCompanyListTest in tests/
src/ Functional/ DeveloperTest.php - Tests getCompanies() and hasCompany() methods on the developer entity.
- TeamInvitationEventsTest::testEvents in modules/
apigee_edge_teams/ tests/ src/ Kernel/ Event/ TeamInvitationEventsTest.php - Tests team_invitation events.
- TeamInvitationsTest::testInvitationsList in modules/
apigee_edge_teams/ tests/ src/ Functional/ TeamInvitationsTest.php - Tests that a user can see their list of invitations.
File
- tests/
modules/ apigee_mock_api_client/ tests/ src/ Traits/ ApigeeMockApiClientHelperTrait.php, line 204
Class
- ApigeeMockApiClientHelperTrait
- Helper functions working with Apigee tests.
Namespace
Drupal\Tests\apigee_mock_api_client\TraitsCode
protected function queueCompanyResponse(Company $company, $response_code = NULL) {
$context = empty($response_code) ? [] : [
'status_code' => $response_code,
];
$context['company'] = $company;
$context['org_name'] = $this->sdkConnector
->getOrganization();
$this->stack
->queueMockResponse([
'company' => $context,
]);
}