mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 04:58:31 -05:00
tests: refactor send profind request to space function (#7835)
This commit is contained in:
committed by
GitHub
parent
4d14e048d9
commit
0d9f676901
@@ -3477,25 +3477,41 @@ class SpacesContext implements Context {
|
||||
* @param string $spaceName
|
||||
* @param ?string $resource
|
||||
*
|
||||
* @throws GuzzleException
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws JsonException
|
||||
*
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function userSendsPropfindRequestToSpace(string $user, string $spaceName, ?string $resource = ""): void {
|
||||
$this->featureContext->setResponse(
|
||||
$this->sendPropfindRequestToSpace($user, $spaceName, $resource)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $spaceName
|
||||
* @param string|null $resource
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function sendPropfindRequestToSpace(string $user, string $spaceName, ?string $resource = ""): ResponseInterface {
|
||||
$this->setSpaceIDByName($user, $spaceName);
|
||||
$properties = ['oc:permissions','oc:file-parent','oc:fileid','oc:share-types','oc:privatelink','d:resourcetype','oc:size','oc:name','d:getcontenttype','oc:tags','d:lockdiscovery','d:activelock'];
|
||||
$this->featureContext->setResponse(
|
||||
WebDavHelper::propfind(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getActualUsername($user),
|
||||
$this->featureContext->getPasswordForUser($user),
|
||||
$resource,
|
||||
$properties,
|
||||
$this->featureContext->getStepLineRef(),
|
||||
"0",
|
||||
"files",
|
||||
WebDavHelper::DAV_VERSION_SPACES
|
||||
)
|
||||
return WebDavHelper::propfind(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getActualUsername($user),
|
||||
$this->featureContext->getPasswordForUser($user),
|
||||
$resource,
|
||||
$properties,
|
||||
$this->featureContext->getStepLineRef(),
|
||||
"0",
|
||||
"files",
|
||||
WebDavHelper::DAV_VERSION_SPACES
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user