diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-06 10:29:33 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-06 10:30:31 +0200 |
commit | b0babfc847e6bf232e31caf64182c5c571732954 (patch) | |
tree | 8bd1ce0029bb38effcef6d37b534ff79132d1101 /build | |
parent | 6e5aae26086756576ffc7d55398aabe8e452885a (diff) | |
download | nextcloud-server-b0babfc847e6bf232e31caf64182c5c571732954.tar.gz nextcloud-server-b0babfc847e6bf232e31caf64182c5c571732954.zip |
[Intergration] Throw error if exception not thrown
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/bootstrap/FeatureContext.php | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php index ec181206259..9676fc8ca40 100644 --- a/build/integration/features/bootstrap/FeatureContext.php +++ b/build/integration/features/bootstrap/FeatureContext.php @@ -58,9 +58,6 @@ class FeatureContext extends BehatContext { return $response->xml()->meta[0]->statuscode; } - - - /** * @Then /^the OCS status code should be "([^"]*)"$/ */ @@ -68,7 +65,6 @@ class FeatureContext extends BehatContext { PHPUnit_Framework_Assert::assertEquals($statusCode, $this->getOCSResponse($this->response)); } - /** * @Then /^the HTTP status code should be "([^"]*)"$/ */ @@ -76,9 +72,6 @@ class FeatureContext extends BehatContext { PHPUnit_Framework_Assert::assertEquals($statusCode, $this->response->getStatusCode()); } - - - /** * @Given /^As an "([^"]*)"$/ */ @@ -114,13 +107,13 @@ class FeatureContext extends BehatContext { public function userDoesNotExist($user) { try { $this->userExists($user); + PHPUnit_Framework_Assert::fail('The user "' . $user . '" exists'); } catch (\GuzzleHttp\Exception\ClientException $ex) { $this->response = $ex->getResponse(); PHPUnit_Framework_Assert::assertEquals(404, $ex->getResponse()->getStatusCode()); } } - /** * @When /^creating the user "([^"]*)r"$/ */ @@ -141,7 +134,6 @@ class FeatureContext extends BehatContext { } - /** * @When /^creating the group "([^"]*)r"$/ */ @@ -160,7 +152,6 @@ class FeatureContext extends BehatContext { ]); } - /** * @Given /^group "([^"]*)" exists$/ */ @@ -182,13 +173,13 @@ class FeatureContext extends BehatContext { public function groupDoesNotExist($group) { try { $this->groupExists($group); + PHPUnit_Framework_Assert::fail('The group "' . $group . '" exists'); } catch (\GuzzleHttp\Exception\ClientException $ex) { $this->response = $ex->getResponse(); PHPUnit_Framework_Assert::assertEquals(404, $ex->getResponse()->getStatusCode()); } } - /** * @When /^sending "([^"]*)" to "([^"]*)" with$/ * @param \Behat\Gherkin\Node\TableNode|null $formData @@ -211,10 +202,4 @@ class FeatureContext extends BehatContext { $this->response = $ex->getResponse(); } } - - - - - - } |