mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #60763 from nextcloud/fix/noid/behat-scenario-state-isolation
test(behat): reset per-scenario state in BasicStructure and Sharing
This commit is contained in:
commit
29e93a9550
2 changed files with 21 additions and 0 deletions
|
|
@ -72,6 +72,18 @@ trait BasicStructure {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @BeforeScenario
|
||||
*/
|
||||
public function resetAuthState(): void {
|
||||
$this->currentUser = '';
|
||||
$this->currentServer = 'LOCAL';
|
||||
$this->baseUrl = $this->localBaseUrl;
|
||||
$this->apiVersion = 1;
|
||||
$this->requestToken = null;
|
||||
$this->cookieJar = new CookieJar();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^using api version "(\d+)"$/
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,6 +23,15 @@ trait Sharing {
|
|||
/** @var SimpleXMLElement[] */
|
||||
private array $storedShareData = [];
|
||||
private ?string $savedShareId = null;
|
||||
|
||||
/**
|
||||
* @BeforeScenario
|
||||
*/
|
||||
public function resetSharingState(): void {
|
||||
$this->lastShareData = null;
|
||||
$this->storedShareData = [];
|
||||
$this->savedShareId = null;
|
||||
}
|
||||
/** @var ResponseInterface */
|
||||
private $response;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue