Skip to content

Commit

Permalink
Merge pull request #16 from MacPaw/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
Yozhef authored Oct 4, 2023
2 parents 615b0e0 + 326b9d4 commit 4b491f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
run:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down
16 changes: 14 additions & 2 deletions src/Context/RedisContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 4b491f1

Please sign in to comment.