change naming in test (#8140)

This commit is contained in:
Viktor Scharf
2024-01-08 23:41:31 +01:00
committed by GitHub
parent 5b89016890
commit ec37788829
5 changed files with 210 additions and 211 deletions
@@ -21,7 +21,6 @@
use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use PHPUnit\Framework\Assert;
use Psr\Http\Message\ResponseInterface;
use TestHelpers\GraphHelper;
use Behat\Gherkin\Node\TableNode;
@@ -78,7 +77,7 @@ class SharingNgContext implements Context {
$bodyRows['expirationDateTime'] = $bodyRows['expirationDateTime'] ?? null;
$bodyRows['password'] = $bodyRows['password'] ?? null;
$body = [
'type' => $bodyRows['role'],
'type' => $bodyRows['permissionsRole'],
'displayName' => $bodyRows['displayName'],
'expirationDateTime' => $bodyRows['expirationDateTime'],
'password' => $this->featureContext->getActualPassword($bodyRows['password'])
@@ -147,8 +146,8 @@ class SharingNgContext implements Context {
? $this->featureContext->getAttributeOfCreatedUser($rows['sharee'], 'id')
: $this->featureContext->getAttributeOfCreatedGroup($rows['sharee'], 'id');
$role = $rows['role'] ?? null;
$permission = $rows['permission'] ?? null;
$permissionsRole = $rows['permissionsRole'] ?? null;
$permissionsAction = $rows['permissionsAction'] ?? null;
$expireDate = $rows["expireDate"] ?? null;
$this->featureContext->setResponse(
@@ -161,8 +160,8 @@ class SharingNgContext implements Context {
$itemId,
$shareeId,
$rows['shareType'],
$role,
$permission,
$permissionsRole,
$permissionsAction,
$expireDate
)
);
@@ -222,13 +221,13 @@ class SharingNgContext implements Context {
$body = [
"expirationDateTime" => $bodyRows['expirationDateTime'],
"link" => [
"type" => $bodyRows['role']
"type" => $bodyRows['permissionsRole']
]
];
} elseif (\array_key_exists('role', $bodyRows)) {
} elseif (\array_key_exists('permissionsRole', $bodyRows)) {
$body = [
"link" => [
"type" => $bodyRows['role']
"type" => $bodyRows['permissionsRole']
]
];
} elseif (\array_key_exists('expirationDateTime', $bodyRows)) {
@@ -253,7 +252,7 @@ class SharingNgContext implements Context {
}
/**
* @When user :user sets/updates the following password for the last link share using the Graph API:
* @When user :user sets the following password for the last link share using the Graph API:
*
* @param string $user
* @param TableNode|null $body