Skip to content

Commit

Permalink
Clear status codes after a given step
Browse files Browse the repository at this point in the history
Signed-off-by: Parajuli Kiran <[email protected]>
  • Loading branch information
kiranparajuli589 committed Apr 22, 2022
1 parent 00b5a5e commit d00533c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public function serverParameterHasBeenSetTo(string $parameter, string $app, stri
}
$value = \trim($value, $value[0]);
$this->modifyAppConfig($app, $parameter, $value);
$this->featureContext->emptyLastHTTPStatusCodesArray();
$this->featureContext->emptyLastOCSStatusCodesArray();
}

/**
Expand Down
9 changes: 9 additions & 0 deletions tests/acceptance/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,15 @@ public function emptyLastHTTPStatusCodesArray():void {
public function emptyLastOCSStatusCodesArray():void {
$this->lastOCSStatusCodesArray = [];
}

/**
* @return void
*/
public function clearStatusCodeArrays():void {
$this->emptyLastHTTPStatusCodesArray();
$this->emptyLastOCSStatusCodesArray();
}

/**
* @param string $ocsStatusCode
*
Expand Down
3 changes: 2 additions & 1 deletion tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -3601,6 +3601,7 @@ public function userCreatesFolder(string $user, string $destination):void {
*
* @return void
* @throws JsonException
* @throws GuzzleException
*/
public function userHasCreatedFolder(string $user, string $destination):void {
$user = $this->getActualUsername($user);
Expand All @@ -3609,7 +3610,7 @@ public function userHasCreatedFolder(string $user, string $destination):void {
["201", "204"],
"HTTP status code was not 201 or 204 while trying to create folder '$destination' for user '$user'"
);
$this->emptyLastHTTPStatusCodesArray();
$this->clearStatusCodeArrays();
}

/**
Expand Down

0 comments on commit d00533c

Please sign in to comment.