test: use existing method to get space

This commit is contained in:
Saw-jan
2024-10-07 15:03:16 +05:45
parent f1f22c72ad
commit 286e578314
3 changed files with 35 additions and 71 deletions

View File

@@ -283,7 +283,7 @@ class WebDavLockingContext implements Context {
* @return void
*/
public function userHasLockedFileInsideSpaceSettingTheFollowingProperties(string $user, string $file, string $spaceName, TableNode $properties) {
$spaceId = $this->spacesContext->setSpaceIDByName($this->featureContext->getActualUsername($user), $spaceName);
$spaceId = $this->spacesContext->getSpaceIdByName($this->featureContext->getActualUsername($user), $spaceName);
$response = $this->lockFile($user, $file, $properties, null, false, true, $spaceId);
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
}
@@ -421,7 +421,7 @@ class WebDavLockingContext implements Context {
* @return void
*/
public function userUnlocksTheLastCreatedLockOfFileInsideSpaceUsingTheWebdavApi(string $user, string $spaceName, string $file) {
$spaceId = $this->spacesContext->setSpaceIDByName($this->featureContext->getActualUsername($user), $spaceName);
$spaceId = $this->spacesContext->getSpaceIdByName($this->featureContext->getActualUsername($user), $spaceName);
$response = $this->unlockItemWithLastLockOfUserAndItemUsingWebDavAPI(
$user,
$file,