Added test for creating group with case sensitive

This commit is contained in:
Prarup Gurung
2022-08-19 17:16:12 +05:45
parent f3e6237796
commit 07af8544e8
5 changed files with 65 additions and 1 deletions
@@ -428,6 +428,32 @@ class GraphContext implements Context {
}
}
/**
* @When /^the administrator creates a group "([^"]*)" using the Graph API$/
*
* @param string $group
*
* @return void
* @throws Exception
* @throws GuzzleException
*/
public function adminCreatesGroupUsingTheGraphApi(string $group): void {
$response = GraphHelper::createGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$group,
);
$this->featureContext->setResponse($response);
$this->featureContext->pushToLastHttpStatusCodesArray((string) $response->getStatusCode());
if ($response->getStatusCode() === 200) {
$groupId = $this->featureContext->getJsonDecodedResponse($response)["id"];
$this->featureContext->addGroupToCreatedGroupsList($group, true, true, $groupId);
}
}
/**
* create group with provided data
*