test: fix tests

This commit is contained in:
Saw-jan
2024-07-24 11:35:45 +05:45
parent 3883e17b52
commit 15f320f708
4 changed files with 75 additions and 52 deletions
@@ -2857,6 +2857,29 @@ trait Sharing {
$this->pushToLastStatusCodesArrays();
}
/**
* @When /^user "([^"]*)" (declines|accepts) the already (?:accepted|declined) share "([^"]*)" offered by user "([^"]*)" using the sharing API$/
*
* @param string $user
* @param string $action
* @param string $share
* @param string $offeredBy
* @param string|null $state specify 'accepted', 'pending', 'rejected' or 'declined' to only consider shares in that state
*
* @return void
* @throws Exception
*/
public function userAcceptsTheAlreadyAcceptedShareOfferedByUsingTheSharingApi(string $user, string $action, string $share, string $offeredBy, ?string $state = ''):void {
$response = $this->reactToShareOfferedBy(
$user,
$action,
"/Shares/" . \trim($share, "/"),
$offeredBy
);
$this->setResponse($response);
$this->pushToLastStatusCodesArrays();
}
/**
* @When /^user "([^"]*)" (declines|accepts) the following shares offered by user "([^"]*)" using the sharing API$/
*