mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-12 00:26:18 -04:00
updating lint rules for test code
This commit is contained in:
@@ -263,7 +263,11 @@ class SettingsContext implements Context {
|
||||
$assignmentResponse = $this->featureContext->getJsonDecodedResponseBodyContent($response);
|
||||
if (isset($assignmentResponse->assignments[0]->roleId)) {
|
||||
$actualRoleId = $assignmentResponse->assignments[0]->roleId;
|
||||
Assert::assertEquals($this->getRoleIdByRoleName($this->featureContext->getAdminUserName(), $role), $actualRoleId, "user $user has no role $role");
|
||||
Assert::assertEquals(
|
||||
$this->getRoleIdByRoleName($this->featureContext->getAdminUserName(), $role),
|
||||
$actualRoleId,
|
||||
"user $user has no role $role"
|
||||
);
|
||||
} else {
|
||||
Assert::fail("Response should contain user role but not found.\n" . json_encode($assignmentResponse));
|
||||
}
|
||||
@@ -279,8 +283,14 @@ class SettingsContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theSettingApiResponseShouldHaveTheRole(string $role): void {
|
||||
$assignmentRoleId = $this->featureContext->getJsonDecodedResponse($this->featureContext->getResponse())["assignments"][0]["roleId"];
|
||||
Assert::assertEquals($this->getRoleIdByRoleName($this->featureContext->getAdminUserName(), $role), $assignmentRoleId, "user has no role $role");
|
||||
$assignmentRoleId = $this->featureContext->getJsonDecodedResponse(
|
||||
$this->featureContext->getResponse()
|
||||
)["assignments"][0]["roleId"];
|
||||
Assert::assertEquals(
|
||||
$this->getRoleIdByRoleName($this->featureContext->getAdminUserName(), $role),
|
||||
$assignmentRoleId,
|
||||
"user has no role $role"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user