mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-20 05:23:15 -04:00
updating lint rules for test code
This commit is contained in:
1 parent
24798a80d1
commit
089ccc1ca3
45 files changed
+2914
-1151
No files matched your search
@@ -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