From be394718f17facbd66289d59983fb47068436c4a Mon Sep 17 00:00:00 2001 From: Borys Liutikov Date: Fri, 12 May 2023 10:47:38 +0300 Subject: [PATCH 1/2] feat: ApiContext members visibility --- src/Context/ApiContext.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Context/ApiContext.php b/src/Context/ApiContext.php index 74ff7c9..164a451 100644 --- a/src/Context/ApiContext.php +++ b/src/Context/ApiContext.php @@ -29,22 +29,22 @@ class ApiContext implements Context /** * @var array $headers */ - private array $headers = []; + protected array $headers = []; /** * @var array $serverParams */ - private array $serverParams = []; + protected array $serverParams = []; /** * @var array $requestParams */ - private array $requestParams = []; + protected array $requestParams = []; /** * @var array $savedValues */ - private array $savedValues = []; + protected array $savedValues = []; public function __construct( RouterInterface $router, @@ -115,6 +115,7 @@ public function theRequestContainsParams(PyStringNode $params): void $newRequestParams = (array) json_decode($processedParams, true, 512, JSON_THROW_ON_ERROR); $this->requestParams = array_merge($this->requestParams, $newRequestParams); + $this->savedValues = array_merge($this->savedValues, $newRequestParams); } /** @@ -277,7 +278,7 @@ public function responseShouldBeJsonWithVariableFields(string $variableFields, P $this->compareStructureResponse($variableFields, $string, $this->getResponse()->getContent()); } - private function compareStructureResponse(string $variableFields, PyStringNode $string, string $actualJSON): void + protected function compareStructureResponse(string $variableFields, PyStringNode $string, string $actualJSON): void { if ($actualJSON === '') { throw new RuntimeException('Response is not JSON'); @@ -305,7 +306,7 @@ private function resetRequestOptions(): void $this->requestParams = []; } - private function getResponse(): Response + protected function getResponse(): Response { if ($this->response === null) { throw new RuntimeException('Response is null.'); From b1573dffe71e19e605f5319f93fece70029fb727 Mon Sep 17 00:00:00 2001 From: Borys Liutikov Date: Fri, 12 May 2023 15:10:50 +0300 Subject: [PATCH 2/2] Update ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b5289ec..5b55e30 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,7 +5,7 @@ on: jobs: run: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: