diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-29 14:20:36 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-01 08:29:15 +0100 |
commit | 0dd0adf69f4f507551389b147985f92c9d922d43 (patch) | |
tree | a2d8c7a2880d4351857dfb7403be5eed97c357f5 /build/integration/features/bootstrap/Sharing.php | |
parent | ffce4fc6a9bd4b6f77b5268e7bc139d994efaac6 (diff) | |
download | nextcloud-server-0dd0adf69f4f507551389b147985f92c9d922d43.tar.gz nextcloud-server-0dd0adf69f4f507551389b147985f92c9d922d43.zip |
Intergration tests
Diffstat (limited to 'build/integration/features/bootstrap/Sharing.php')
-rw-r--r-- | build/integration/features/bootstrap/Sharing.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index faf8e0bf507..2073c840095 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -17,6 +17,9 @@ trait Sharing{ /** @var SimpleXMLElement */ private $lastShareData = null; + /** @var int */ + private $savedShareId = null; + /** * @When /^creating a share with$/ * @param \Behat\Gherkin\Node\TableNode|null $formData @@ -414,5 +417,22 @@ trait Sharing{ } } + /** + * @When save last share id + */ + public function saveLastShareId() + { + $this->savedShareId = $this->lastShareData['data']['id']; + } + + /** + * @Then share ids should match + */ + public function shareIdsShouldMatch() + { + if ($this->savedShareId !== $this->lastShareData['data']['id']) { + throw new \Excetion('Expected the same link share to be returned'); + } + } } |