restored assertions in existance of users and groups
This commit is contained in:
parent
fd709b4b49
commit
0c1a657282
|
@ -43,25 +43,25 @@ class FeatureContext extends BehatContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @When /^sending "([^"]*)" to "([^"]*)"$/
|
* @When /^sending "([^"]*)" to "([^"]*)"$/
|
||||||
*/
|
*/
|
||||||
public function sendingTo($verb, $url) {
|
public function sendingTo($verb, $url) {
|
||||||
$this->sendingToWith($verb, $url, null);
|
$this->sendingToWith($verb, $url, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the xml answer to get ocs response which doesn't match with
|
* Parses the xml answer to get ocs response which doesn't match with
|
||||||
* http one in v1 of the api.
|
* http one in v1 of the api.
|
||||||
*/
|
*/
|
||||||
public function getOCSResponse($response){
|
public function getOCSResponse($response){
|
||||||
return $response->xml()->meta[0]->statuscode;
|
return $response->xml()->meta[0]->statuscode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then /^the OCS status code should be "([^"]*)"$/
|
* @Then /^the OCS status code should be "([^"]*)"$/
|
||||||
*/
|
*/
|
||||||
public function theOCSStatusCodeShouldBe($statusCode) {
|
public function theOCSStatusCodeShouldBe($statusCode) {
|
||||||
|
@ -69,7 +69,7 @@ class FeatureContext extends BehatContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then /^the HTTP status code should be "([^"]*)"$/
|
* @Then /^the HTTP status code should be "([^"]*)"$/
|
||||||
*/
|
*/
|
||||||
public function theHTTPStatusCodeShouldBe($statusCode) {
|
public function theHTTPStatusCodeShouldBe($statusCode) {
|
||||||
|
@ -116,6 +116,7 @@ class FeatureContext extends BehatContext {
|
||||||
$this->userExists($user);
|
$this->userExists($user);
|
||||||
} catch (\GuzzleHttp\Exception\ClientException $ex) {
|
} catch (\GuzzleHttp\Exception\ClientException $ex) {
|
||||||
$this->response = $ex->getResponse();
|
$this->response = $ex->getResponse();
|
||||||
|
PHPUnit_Framework_Assert::assertEquals(404, $ex->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +142,7 @@ class FeatureContext extends BehatContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @When /^creating the group "([^"]*)r"$/
|
* @When /^creating the group "([^"]*)r"$/
|
||||||
*/
|
*/
|
||||||
public function creatingTheGroup($group) {
|
public function creatingTheGroup($group) {
|
||||||
|
@ -183,6 +184,7 @@ class FeatureContext extends BehatContext {
|
||||||
$this->groupExists($group);
|
$this->groupExists($group);
|
||||||
} catch (\GuzzleHttp\Exception\ClientException $ex) {
|
} catch (\GuzzleHttp\Exception\ClientException $ex) {
|
||||||
$this->response = $ex->getResponse();
|
$this->response = $ex->getResponse();
|
||||||
|
PHPUnit_Framework_Assert::assertEquals(404, $ex->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue