Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "test: gateway checker" #3910

Merged
merged 1 commit into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 3 additions & 33 deletions tests/integration/bootstrap/RestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class RestContext implements Context
private $restObjectType = null;
private $restObjectMethod = 'get';
private $client = null;
/**
* @var \GuzzleHttp\Psr7\Response
*/
private $response = null;
private $requestUrl = null;
private $apiUrl = 'api/v3';
Expand All @@ -40,8 +37,6 @@ class RestContext implements Context
private $postFields = [];
private $postFiles = [];

const DEBUG_MODE_SWITCH_FILE_PATH = __DIR__ . "/../../../bootstrap/install_debug_mode.enabled";

/**
* Initializes context.
* Every scenario gets it's own context object.
Expand Down Expand Up @@ -206,24 +201,6 @@ public function thatThePostFileIs($fieldName, $fieldValue)
$this->postFiles[$fieldName] = $fieldValue;
}

/**
* @Given /^that I have enabled debug mode$/
*/
public function thatIHaveEnabledDebugMode()
{
fopen(self::DEBUG_MODE_SWITCH_FILE_PATH, "w");
}

/**
* @AfterScenario
* @Given /^that I have disabled debug mode$/
*/
public function disableDebugModeAfterScenario()
{
if (file_exists(self::DEBUG_MODE_SWITCH_FILE_PATH)) {
unlink(self::DEBUG_MODE_SWITCH_FILE_PATH);
}
}
/**
* @When /^I request "([^"]*)"$/
*/
Expand All @@ -234,9 +211,9 @@ public function iRequest($pageUrl)
switch (strtoupper($this->restObjectMethod)) {
case 'GET':
$request = (array)$this->restObject;
$idAttachment = ( isset($request['id']) ) ? "/" . $request['id'] : '';
$id = ( isset($request['id']) ) ? $request['id'] : '';
$response = $this->client
->get($this->requestUrl.$idAttachment, [
->get($this->requestUrl.'/'.$id, [
'query' => isset($request['query string']) ? trim($request['query string']) : null,
'headers' => $this->headers
]);
Expand Down Expand Up @@ -426,13 +403,6 @@ public function theResponseIsJsonp()
}
}

/**
* @Then /^the response is empty/
*/
public function theResponseIsEmpty()
{
\PHPUnit_Framework_Assert::assertEquals(0, $this->response->getBody()->getSize());
}
/**
* @Given /^the response has a "([^"]*)" property$/
* @Given /^the response has an "([^"]*)" property$/
Expand Down Expand Up @@ -661,7 +631,7 @@ public function thePropertyIsEmpty($propertyName)
$actualPropertyValue = array_get($data, $propertyName);

if (!empty($actualPropertyValue)) {
throw new \Exception("Property '{$propertyName}' is not empty but '{$actualPropertyValue}'\n");
throw new \Exception("Property '{$propertyName}' is not empty!\n");
}
}

Expand Down
68 changes: 0 additions & 68 deletions tests/integration/gwchecker.feature

This file was deleted.