santize service health and reasy url
This commit is contained in:
@@ -213,7 +213,7 @@ class AuthContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userRequestsEndpointsWithNoAuthentication(string $method, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint'], ['service']);
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint']);
|
||||
foreach ($table->getHash() as $row) {
|
||||
$this->featureContext->setResponse(
|
||||
$this->sendRequest(
|
||||
@@ -225,6 +225,29 @@ class AuthContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @When a user requests these URLs with :method and no authentication
|
||||
*
|
||||
* @param $method
|
||||
* @param TableNode $table
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function aUserRequestsTheseUrlsWithAndNoAuthentication($method, TableNode $table): void {
|
||||
$this->featureContext->verifyTableNodeColumns($table, ['endpoint'], ['service']);
|
||||
foreach ($table->getHash() as $row) {
|
||||
$this->featureContext->setResponse(
|
||||
HttpRequestHelper::sendRequest(
|
||||
$this->featureContext->substituteInLineCodes($row['endpoint']),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$method
|
||||
)
|
||||
);
|
||||
$this->featureContext->pushToLastStatusCodesArrays();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the user :user requests these endpoints with :method with basic auth
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user