Skip to content

Commit

Permalink
Merge pull request #14 from MacPaw/feat/addMirroringMethod
Browse files Browse the repository at this point in the history
feat: add mirroring method
  • Loading branch information
Yozhef authored Oct 4, 2023
2 parents 2df2f4e + 8680444 commit 326b9d4
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

Check warning on line 58 in src/Context/RedisContext.php

View check run for this annotation

Codecov / codecov/patch

src/Context/RedisContext.php#L58

Added line #L58 was not covered by tests
{
$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));

Check warning on line 63 in src/Context/RedisContext.php

View check run for this annotation

Codecov / codecov/patch

src/Context/RedisContext.php#L63

Added line #L63 was not covered by tests
}

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

Check warning on line 79 in src/Context/RedisContext.php

View check run for this annotation

Codecov / codecov/patch

src/Context/RedisContext.php#L79

Added line #L79 was not covered by tests
{
$found = $this->redis->get($key);

Check warning on line 81 in src/Context/RedisContext.php

View check run for this annotation

Codecov / codecov/patch

src/Context/RedisContext.php#L81

Added line #L81 was not covered by tests

if ($found) {
throw new InvalidArgumentException(sprintf('Redis contains data for key "%s"', $key));

Check warning on line 84 in src/Context/RedisContext.php

View check run for this annotation

Codecov / codecov/patch

src/Context/RedisContext.php#L83-L84

Added lines #L83 - L84 were not covered by tests
}
}

/**
* @param string $key
* @param PyStringNode $string
Expand Down

0 comments on commit 326b9d4

Please sign in to comment.