From 771ad85f859ccaeb815f0ff5256dfde36ce589c6 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Mon, 15 Apr 2019 12:22:34 +0200 Subject: Add integration tests for updating folder shares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- build/integration/features/bootstrap/Sharing.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'build/integration/features/bootstrap/Sharing.php') diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index 9a3c00af489..8fcbbb2fcc1 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -42,6 +42,9 @@ trait Sharing { /** @var SimpleXMLElement */ private $lastShareData = null; + /** @var SimpleXMLElement[] */ + private $storedShareData = []; + /** @var int */ private $savedShareId = null; @@ -85,6 +88,20 @@ trait Sharing { $this->lastShareData = simplexml_load_string($this->response->getBody()); } + /** + * @When /^save the last share data as "([^"]*)"$/ + */ + public function saveLastShareData($name) { + $this->storedShareData[$name] = $this->lastShareData; + } + + /** + * @When /^restore the last share data from "([^"]*)"$/ + */ + public function restoreLastShareData($name) { + $this->lastShareData = $this->storedShareData[$name]; + } + /** * @When /^creating a share with$/ * @param \Behat\Gherkin\Node\TableNode|null $body -- cgit v1.2.3