From d08b2d660c1a623952c6ea0a84b36860c7328971 Mon Sep 17 00:00:00 2001 From: Ihor Date: Wed, 4 Oct 2023 15:35:36 +0200 Subject: [PATCH 1/2] feat: add mirroring method --- src/Context/RedisContext.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Context/RedisContext.php b/src/Context/RedisContext.php index a6ad449..cdc3c29 100644 --- a/src/Context/RedisContext.php +++ b/src/Context/RedisContext.php @@ -55,12 +55,12 @@ public function iSaveStringParamsToRedis(string $value, string $key): void * * @When /^I see in redis value "([^"]*)" by key "([^"]*)"$/ */ - public function iSeeInRedisValueByKay(string $value, string $key): void + public function iSeeInRedisValueByKey(string $value, string $key): void { $found = $this->redis->get($key); if (!$found) { - throw new InvalidArgumentException(sprintf('In Redis does not data in key "%s"', $key)); + throw new InvalidArgumentException(sprintf('In Redis does not exist data for key "%s"', $key)); } if ($value !== $found) { @@ -73,6 +73,18 @@ public function iSeeInRedisValueByKay(string $value, string $key): void } } + /** + * @When /^I don't see in redis value by key "([^"]*)"$/ + */ + public function iDontSeeInRedisValueByKey(string $key): void + { + $found = $this->redis->get($key); + + if ($found) { + throw new InvalidArgumentException(sprintf('Redis contains data for key "%s"', $key)); + } + } + /** * @param string $key * @param PyStringNode $string From 5b85a8e2edf59c103ed5b1052c104aea5d4b1fcc Mon Sep 17 00:00:00 2001 From: Yozhef Date: Wed, 4 Oct 2023 20:24:51 +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 d808054..8469dad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: jobs: run: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: