mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
removing usage of a stepdefination inside another stepdefination in FavoritesContext.php (#9116)
This commit is contained in:
@@ -73,40 +73,6 @@ class FavoritesContext implements Context {
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(207, '', $this->userFavoritesElement($user, $path));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the user favorites element :path using the WebDAV API
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theUserFavoritesElement(string $path):void {
|
||||
$response = $this->userFavoritesElement(
|
||||
$this->featureContext->getCurrentUser(),
|
||||
$path
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the user has favorited element :path
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theUserHasFavoritedElement(string $path):void {
|
||||
$response = $this->userFavoritesElement(
|
||||
$this->featureContext->getCurrentUser(),
|
||||
$path
|
||||
);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(
|
||||
207,
|
||||
"Expected response status code to be 207 (Multi-status), but not found! ",
|
||||
$response
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
@@ -133,18 +99,6 @@ class FavoritesContext implements Context {
|
||||
$this->featureContext->setResponse($this->userUnfavoritesElement($user, $path));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has unfavorited element :path
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userHasUnfavoritedElementUsingWebDavApi(string $user, string $path):void {
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(207, '', $this->userUnfavoritesElement($user, $path));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should (not|)\s?have favorited the following elements$/
|
||||
*
|
||||
@@ -207,40 +161,6 @@ class FavoritesContext implements Context {
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function theUserUnfavoritesElement(string $path):ResponseInterface {
|
||||
return $this->userUnfavoritesElement(
|
||||
$this->featureContext->getCurrentUser(),
|
||||
$path
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the user unfavorites element :path using the WebDAV API
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theUserUnfavoritesElementUsingWebDavApi(string $path):void {
|
||||
$this->featureContext->setResponse($this->theUserUnfavoritesElement($path));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the user has unfavorited element :path
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theUserHasUnfavoritedElementUsingWebDavApi(string $path):void {
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(207, '', $this->theUserUnfavoritesElement($path));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" should be favorited$/
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user