From 5e88ce14fecde533b0c6473052c5c0190445d436 Mon Sep 17 00:00:00 2001 From: ScharfViktor Date: Tue, 26 Oct 2021 09:08:08 +0200 Subject: [PATCH 1/4] separate tests. add check quota. add test create folder --- .../features/apiSpaces/ListSpaces.feature | 51 +++++++--- .../features/bootstrap/SpacesContext.php | 93 ++++++++++++++++++- 2 files changed, 130 insertions(+), 14 deletions(-) diff --git a/tests/acceptance/features/apiSpaces/ListSpaces.feature b/tests/acceptance/features/apiSpaces/ListSpaces.feature index ab7e5eb78..202151c7a 100644 --- a/tests/acceptance/features/apiSpaces/ListSpaces.feature +++ b/tests/acceptance/features/apiSpaces/ListSpaces.feature @@ -6,23 +6,52 @@ Feature: List and create spaces Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 - Scenario: list own spaces + Background: Given user "Alice" has been created with default attributes and without skeleton files + + Scenario: Alice request her space via the Graph api, she expects a 200 code and the correct data in the response When user "Alice" lists all available spaces via the GraphApi Then the HTTP status code should be "200" - When user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api + And the json responded should contain these key and value pairs + | key | value | + | driveType | personal | + | name | Alice Hansen | + + Scenario: Alice requests her space via webDav api, she expects a 207 code and the correct data in the xml response + When user "Alice" lists all available spaces via the GraphApi + And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api Then the HTTP status code should be "207" - #Then the propfind result of the space should contain these entries: - #| .space/ | - Then the propfind result of the space should not contain these entries: - | file | + And the propfind result of the space should contain these entries: + | .space/ | + + Scenario: Alice tryes to create Space via Graph api without right, she expects a response of 401 When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "401" - When the administrator gives "Alice" the role "Admin" using the settings api + + Scenario: Alice creates Space via Graph api with defaul quota, she expects a 201 code and the correct data in the response + Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "201" - Then the json responded should contain these key and value pairs - | key | value | - | driveType | project | - | name | Project Mars | + And the json responded should contain these key and value pairs + | key | value | + | driveType | project | + | name | Project Mars | + | total | 1000000000 | + + Scenario: Alice creates Space via Graph api, she expects a 201 code and the correct data in the response + Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi + Then the HTTP status code should be "201" + And the json responded should contain these key and value pairs + | key | value | + | driveType | project | + | name | Project Venus | + | total | 2000 | + + Scenario: Alice creates folder via Graph api, she expects a 201 code and the correct data in the response + Given the administrator gives "Alice" the role "Admin" using the settings api + When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi + And user "Alice" lists all available spaces via the GraphApi + When user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api + Then the HTTP status code should be "201" + \ No newline at end of file diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 990126918..418549241 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -404,7 +404,7 @@ class SpacesContext implements Context { } /** - * @Then the json responded should contain these key and value pairs + * @Then /the json responded should contain these key and value pairs/ * * @param TableNode $table * @@ -413,11 +413,37 @@ class SpacesContext implements Context { public function jsonRespondedShouldContain(TableNode $table) { $this->featureContext->verifyTableNodeColumns($table, ['key', 'value']); $responseJson = json_decode($this->featureContext->getResponse()->getBody(), true); + foreach ($table->getHash() as $row) { - $expected = [$row["key"] => $row["value"]]; - Assert::assertEquals($row["value"], $responseJson[$row["key"]]); + if (empty($this->searchKeyValueInArray($responseJson, $row["key"], $row["value"]))){ + Assert::assertFalse($row["value"], ($row["value"] . ' not found')); + } } } + + /** + * Method search for a match $key->$value + * + * @param array $array + * @param string $key + * @param string $value + * @return array $results + */ + public function searchKeyValueInArray($array, $key, $value) + { + $results = array(); + + if (is_array($array)) { + if (isset($array[$key]) && $array[$key] == $value) { + $results[] = $array; + } + + foreach ($array as $subarray) { + $results = array_merge($results, $this->searchKeyValueInArray($subarray, $key, $value)); + } + } + return $results; + } /** * @param string $shouldOrNot (not|) @@ -452,6 +478,7 @@ class SpacesContext implements Context { } } } + /** * Verify that the tableNode contains expected number of columns * @@ -533,4 +560,64 @@ class SpacesContext implements Context { } return false; } + + /** + * @When /^user "([^"]*)" creates a folder "([^"]*)" in space "([^"]*)" using the WebDav Api$/ + * + * @param string $user + * @param string $folder + * @param string $spaceName + * + * @return void + * @throws JsonException + */ + public function theUserCreatesAFolderUsingTheGraphApi($user, $folder, $spaceName): void + { + $this->featureContext->setResponse( + $this->sendCreateFolderRequest( + $this->featureContext->getBaseUrl(), + "", + "MKCOL", + $user, + $this->featureContext->getPasswordForUser($user), + $folder, + $spaceName + ) + ); + } + + /** + * Send Graph Create Space Request + * + * @param $baseUrl + * @param $user + * @param $password + * @param string $method + * @param string $xRequestId + * @param array $headers + * @param string $folder + * @param string $spaceName + * @return ResponseInterface + */ + public function sendCreateFolderRequest( + $baseUrl, + string $xRequestId = '', + string $method, + $user, + $password, + $folder, + $spaceName, + array $headers = [] + + ): ResponseInterface + { + $spaceId = $this->getAvailableSpaces()[$spaceName]["id"]; + $fullUrl = $baseUrl; + if (!str_ends_with($fullUrl, '/')) { + $fullUrl .= '/'; + } + $fullUrl .= "dav/spaces/" . $spaceId . '/' . $folder; + + return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, $method, $user, $password, $headers); + } } From a59d44c2ef7fefe177df2073ce832006ffd13352 Mon Sep 17 00:00:00 2001 From: ScharfViktor Date: Tue, 26 Oct 2021 11:19:10 +0200 Subject: [PATCH 2/4] fix step sequence of scenarios --- .../features/apiSpaces/ListSpaces.feature | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/acceptance/features/apiSpaces/ListSpaces.feature b/tests/acceptance/features/apiSpaces/ListSpaces.feature index 202151c7a..cfcce682c 100644 --- a/tests/acceptance/features/apiSpaces/ListSpaces.feature +++ b/tests/acceptance/features/apiSpaces/ListSpaces.feature @@ -17,18 +17,16 @@ Feature: List and create spaces | driveType | personal | | name | Alice Hansen | - Scenario: Alice requests her space via webDav api, she expects a 207 code and the correct data in the xml response + Scenario: Alice requests her space via webDav api, she expects a 207 code When user "Alice" lists all available spaces via the GraphApi And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api Then the HTTP status code should be "207" - And the propfind result of the space should contain these entries: - | .space/ | Scenario: Alice tryes to create Space via Graph api without right, she expects a response of 401 When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "401" - Scenario: Alice creates Space via Graph api with defaul quota, she expects a 201 code and the correct data in the response + Scenario: Alice creates Space via Graph api with defaul quota, she expects a 201 code the correct data and that space exists Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "201" @@ -37,8 +35,12 @@ Feature: List and create spaces | driveType | project | | name | Project Mars | | total | 1000000000 | + When user "Alice" lists all available spaces via the GraphApi + And user "Alice" lists the content of the space with the name "Project Mars" using the WebDav Api + Then the propfind result of the space should contain these entries: + | .space/ | - Scenario: Alice creates Space via Graph api, she expects a 201 code and the correct data in the response + Scenario: Alice creates Space via Graph api with certain quota, she expects a 201 code and the correct data in the response Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi Then the HTTP status code should be "201" @@ -48,10 +50,13 @@ Feature: List and create spaces | name | Project Venus | | total | 2000 | - Scenario: Alice creates folder via Graph api, she expects a 201 code and the correct data in the response + Scenario: Alice creates folder via Graph api in space, she expects a 201 code and she checks that folder exists Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi And user "Alice" lists all available spaces via the GraphApi - When user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api + And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api Then the HTTP status code should be "201" + When user "Alice" lists the content of the space with the name "Project Venus" using the WebDav Api + Then the propfind result of the space should contain these entries: + | mainFolder/ | \ No newline at end of file From 4664e578caa91d726e9c4ee71215f450759c1c8b Mon Sep 17 00:00:00 2001 From: ScharfViktor Date: Wed, 27 Oct 2021 13:41:51 +0200 Subject: [PATCH 3/4] fix after review --- .../features/apiSpaces/ListSpaces.feature | 30 +++++----- .../features/bootstrap/SpacesContext.php | 57 +++++++++---------- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/tests/acceptance/features/apiSpaces/ListSpaces.feature b/tests/acceptance/features/apiSpaces/ListSpaces.feature index cfcce682c..69d369c47 100644 --- a/tests/acceptance/features/apiSpaces/ListSpaces.feature +++ b/tests/acceptance/features/apiSpaces/ListSpaces.feature @@ -13,13 +13,14 @@ Feature: List and create spaces When user "Alice" lists all available spaces via the GraphApi Then the HTTP status code should be "200" And the json responded should contain these key and value pairs - | key | value | - | driveType | personal | - | name | Alice Hansen | + | key | value | + | driveType | personal | + | name | Alice Hansen | + | quota@@@used | 0 | Scenario: Alice requests her space via webDav api, she expects a 207 code When user "Alice" lists all available spaces via the GraphApi - And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api + And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api Then the HTTP status code should be "207" Scenario: Alice tryes to create Space via Graph api without right, she expects a response of 401 @@ -31,10 +32,11 @@ Feature: List and create spaces When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "201" And the json responded should contain these key and value pairs - | key | value | - | driveType | project | - | name | Project Mars | - | total | 1000000000 | + | key | value | + | driveType | project | + | name | Project Mars | + | quota@@@total | 1000000000 | + When user "Alice" lists all available spaces via the GraphApi And user "Alice" lists the content of the space with the name "Project Mars" using the WebDav Api Then the propfind result of the space should contain these entries: @@ -45,16 +47,16 @@ Feature: List and create spaces When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi Then the HTTP status code should be "201" And the json responded should contain these key and value pairs - | key | value | - | driveType | project | - | name | Project Venus | - | total | 2000 | + | key | value | + | driveType | project | + | name | Project Venus | + | quota@@@total | 2000 | - Scenario: Alice creates folder via Graph api in space, she expects a 201 code and she checks that folder exists + Scenario: Alice creates folder via WebDav api in space, she expects a 201 code and she checks that folder exists Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi And user "Alice" lists all available spaces via the GraphApi - And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api + And user "Alice" creates a folder "mainFolder" in space "Project Venus" using the WebDav Api Then the HTTP status code should be "201" When user "Alice" lists the content of the space with the name "Project Venus" using the WebDav Api Then the propfind result of the space should contain these entries: diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 418549241..254781c73 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -412,38 +412,35 @@ class SpacesContext implements Context { */ public function jsonRespondedShouldContain(TableNode $table) { $this->featureContext->verifyTableNodeColumns($table, ['key', 'value']); - $responseJson = json_decode($this->featureContext->getResponse()->getBody(), true); - foreach ($table->getHash() as $row) { - if (empty($this->searchKeyValueInArray($responseJson, $row["key"], $row["value"]))){ - Assert::assertFalse($row["value"], ($row["value"] . ' not found')); + $responseJson = json_decode($this->featureContext->getResponse()->getBody(), true); + $segments = explode("@@@", $row["key"]); + foreach ($segments as $segment) { + $arrayKeyExists = array_key_exists($segment, $responseJson); + if ($arrayKeyExists) { + $responseJson = $responseJson[$segment]; + } + else { + foreach($responseJson as $firstLevelArray) { + if (array_key_exists($segment, $firstLevelArray)){ + $responseJson = $firstLevelArray[$segment]; + } else { + foreach($firstLevelArray as $secondLevelArray) { + if (array_key_exists($segment, $secondLevelArray)){ + $responseJson = $secondLevelArray[$segment]; + } + else { + $key = $row["key"]; + Assert::assertTrue(array_key_exists($segment, $secondLevelArray), "The key $key does not exist on the response"); + } + } + } + } + } } + Assert::assertEquals($row["value"], $responseJson); } } - - /** - * Method search for a match $key->$value - * - * @param array $array - * @param string $key - * @param string $value - * @return array $results - */ - public function searchKeyValueInArray($array, $key, $value) - { - $results = array(); - - if (is_array($array)) { - if (isset($array[$key]) && $array[$key] == $value) { - $results[] = $array; - } - - foreach ($array as $subarray) { - $results = array_merge($results, $this->searchKeyValueInArray($subarray, $key, $value)); - } - } - return $results; - } /** * @param string $shouldOrNot (not|) @@ -571,7 +568,7 @@ class SpacesContext implements Context { * @return void * @throws JsonException */ - public function theUserCreatesAFolderUsingTheGraphApi($user, $folder, $spaceName): void + public function theUserCreatesAFolderUsingTheWebDavApi($user, $folder, $spaceName): void { $this->featureContext->setResponse( $this->sendCreateFolderRequest( @@ -587,7 +584,7 @@ class SpacesContext implements Context { } /** - * Send Graph Create Space Request + * Send Webdav Create Folder Request * * @param $baseUrl * @param $user From 86d5c56395858ce0f5388ad3cc29b2a9129e0d35 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 27 Oct 2021 17:44:36 +0200 Subject: [PATCH 4/4] refactor the evaluation of the json response --- .../features/apiSpaces/ListSpaces.feature | 50 +++++---- .../features/bootstrap/SpacesContext.php | 103 +++++++++++++----- 2 files changed, 100 insertions(+), 53 deletions(-) diff --git a/tests/acceptance/features/apiSpaces/ListSpaces.feature b/tests/acceptance/features/apiSpaces/ListSpaces.feature index 69d369c47..209f0ffc5 100644 --- a/tests/acceptance/features/apiSpaces/ListSpaces.feature +++ b/tests/acceptance/features/apiSpaces/ListSpaces.feature @@ -1,7 +1,7 @@ @api @skipOnOcV10 Feature: List and create spaces As a user - I want to be able to work with personal and project spaces to collaborate with individuals and teams + I want to be able to work with personal and project spaces Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 @@ -12,31 +12,33 @@ Feature: List and create spaces Scenario: Alice request her space via the Graph api, she expects a 200 code and the correct data in the response When user "Alice" lists all available spaces via the GraphApi Then the HTTP status code should be "200" - And the json responded should contain these key and value pairs - | key | value | - | driveType | personal | - | name | Alice Hansen | - | quota@@@used | 0 | + And the json responded should contain a space "Alice Hansen" with these key and value pairs: + | key | value | + | driveType | personal | + | id | %space_id% | + | name | Alice Hansen | + | quota@@@state | normal | + | root@@@webDavUrl | %base_url%/dav/spaces/%space_id% | - Scenario: Alice requests her space via webDav api, she expects a 207 code + Scenario: Alice requests her space via webDav api, she expects a 207 code When user "Alice" lists all available spaces via the GraphApi - And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api + And user "Alice" lists the content of the space with the name "Alice Hansen" using the WebDav Api Then the HTTP status code should be "207" - Scenario: Alice tryes to create Space via Graph api without right, she expects a response of 401 + Scenario: Alice tries to create Space via Graph api without permission, she expects a response of 401 When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "401" - Scenario: Alice creates Space via Graph api with defaul quota, she expects a 201 code the correct data and that space exists + Scenario: Alice creates Space via Graph api with default quota, she expects a 201 code the correct data and that space exists Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the GraphApi Then the HTTP status code should be "201" - And the json responded should contain these key and value pairs - | key | value | - | driveType | project | - | name | Project Mars | - | quota@@@total | 1000000000 | - + And the json responded should contain a space "Project Mars" with these key and value pairs: + | key | value | + | driveType | project | + | name | Project Mars | + | quota@@@total | 1000000000 | + | root@@@webDavUrl | %base_url%/dav/spaces/%space_id% | When user "Alice" lists all available spaces via the GraphApi And user "Alice" lists the content of the space with the name "Project Mars" using the WebDav Api Then the propfind result of the space should contain these entries: @@ -46,13 +48,14 @@ Feature: List and create spaces Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi Then the HTTP status code should be "201" - And the json responded should contain these key and value pairs - | key | value | - | driveType | project | - | name | Project Venus | - | quota@@@total | 2000 | - - Scenario: Alice creates folder via WebDav api in space, she expects a 201 code and she checks that folder exists + And the json responded should contain a space "Project Venus" with these key and value pairs: + | key | value | + | driveType | project | + | name | Project Venus | + | quota@@@total | 2000 | + | root@@@webDavUrl | %base_url%/dav/spaces/%space_id% | + + Scenario: Alice creates folder via Graph api in space, she expects a 201 code and she checks that folder exists Given the administrator gives "Alice" the role "Admin" using the settings api When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the GraphApi And user "Alice" lists all available spaces via the GraphApi @@ -61,4 +64,3 @@ Feature: List and create spaces When user "Alice" lists the content of the space with the name "Project Venus" using the WebDav Api Then the propfind result of the space should contain these entries: | mainFolder/ | - \ No newline at end of file diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 254781c73..f3bfd24eb 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -87,6 +87,47 @@ class SpacesContext implements Context { return $this->responseSpaceId; } + /** + * Get SpaceId by Name + * + * @param $name string + * @return string + */ + public function getSpaceIdByName(string $name): string + { + $response = json_decode($this->featureContext->getResponse()->getBody(), true); + if (isset($response['name']) && $response['name'] === $name) { + return $response["id"]; + } + foreach ($response["value"] as $spaceCandidate) { + if ($spaceCandidate['name'] === $name) { + return $spaceCandidate["id"]; + } + } + return false; + } + + /** + * Get Space Array by name + * + * @param string $name + * @return array + */ + public function getSpaceByName(string $name): array + { + $response = json_decode($this->featureContext->getResponse()->getBody(), true); + $spaceAsArray = $response; + if (isset($response['name']) && $response['name'] === $name) { + return $response; + } + foreach ($spaceAsArray["value"] as $spaceCandidate) { + if ($spaceCandidate['name'] === $name) { + return $spaceCandidate; + } + } + return []; + } + /** * @BeforeScenario * @@ -404,41 +445,45 @@ class SpacesContext implements Context { } /** - * @Then /the json responded should contain these key and value pairs/ + * @Then /^the json responded should contain a space "([^"]*)" with these key and value pairs:$/ * + * @param string $spaceName * @param TableNode $table * * @return void */ - public function jsonRespondedShouldContain(TableNode $table) { + public function jsonRespondedShouldContain($spaceName, TableNode $table) { $this->featureContext->verifyTableNodeColumns($table, ['key', 'value']); + Assert::assertIsArray($spaceAsArray = $this->getSpaceByName($spaceName), "No space with name $spaceName found"); foreach ($table->getHash() as $row) { - $responseJson = json_decode($this->featureContext->getResponse()->getBody(), true); + // remember the original Space Array + $original = $spaceAsArray; + $row['value'] = $this->featureContext->substituteInLineCodes( + $row['value'], + $this->featureContext->getCurrentUser(), + [], + [ + [ + "code" => "%space_id%", + "function" => + [$this, "getSpaceIdByName"], + "parameter" => ["$spaceName"] + ] + ] + ); $segments = explode("@@@", $row["key"]); + // traverse down in the array foreach ($segments as $segment) { - $arrayKeyExists = array_key_exists($segment, $responseJson); + $arrayKeyExists = array_key_exists($segment, $spaceAsArray); + $key = $row["key"]; + Assert::assertTrue($arrayKeyExists, "The key $key does not exist on the response"); if ($arrayKeyExists) { - $responseJson = $responseJson[$segment]; - } - else { - foreach($responseJson as $firstLevelArray) { - if (array_key_exists($segment, $firstLevelArray)){ - $responseJson = $firstLevelArray[$segment]; - } else { - foreach($firstLevelArray as $secondLevelArray) { - if (array_key_exists($segment, $secondLevelArray)){ - $responseJson = $secondLevelArray[$segment]; - } - else { - $key = $row["key"]; - Assert::assertTrue(array_key_exists($segment, $secondLevelArray), "The key $key does not exist on the response"); - } - } - } - } + $spaceAsArray = $spaceAsArray[$segment]; } } - Assert::assertEquals($row["value"], $responseJson); + Assert::assertEquals($row["value"], $spaceAsArray); + // set the spaceArray to the point before traversing + $spaceAsArray = $original; } } @@ -561,14 +606,14 @@ class SpacesContext implements Context { /** * @When /^user "([^"]*)" creates a folder "([^"]*)" in space "([^"]*)" using the WebDav Api$/ * - * @param string $user - * @param string $folder - * @param string $spaceName + * @param string $user + * @param string $folder + * @param string $spaceName * * @return void * @throws JsonException */ - public function theUserCreatesAFolderUsingTheWebDavApi($user, $folder, $spaceName): void + public function theUserCreatesAFolderUsingTheGraphApi($user, $folder, $spaceName): void { $this->featureContext->setResponse( $this->sendCreateFolderRequest( @@ -584,7 +629,7 @@ class SpacesContext implements Context { } /** - * Send Webdav Create Folder Request + * Send Graph Create Space Request * * @param $baseUrl * @param $user @@ -605,7 +650,7 @@ class SpacesContext implements Context { $folder, $spaceName, array $headers = [] - + ): ResponseInterface { $spaceId = $this->getAvailableSpaces()[$spaceName]["id"];