1 | <?php |
||
8 | class FeatureContextBackup implements SnippetAcceptingContext |
||
9 | { |
||
10 | /** |
||
11 | * @var \Redis |
||
12 | */ |
||
13 | private $redis; |
||
14 | |||
15 | /** |
||
16 | * @var RedisCache |
||
17 | */ |
||
18 | private $backend; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $result; |
||
24 | |||
25 | /** |
||
26 | * FeatureContext constructor. |
||
27 | */ |
||
28 | public function __construct() |
||
34 | |||
35 | /** |
||
36 | * @BeforeScenario |
||
37 | */ |
||
38 | public function reset() |
||
42 | |||
43 | /** |
||
44 | * @Given The cache is empty |
||
45 | */ |
||
46 | public function theCacheIsEmpty() |
||
50 | |||
51 | /** |
||
52 | * @Given I store a an item in the cache |
||
53 | */ |
||
54 | public function iStoreAAnItemInTheCache() |
||
58 | |||
59 | /** |
||
60 | * @When I retrieve it |
||
61 | */ |
||
62 | public function whenIRetrieved() |
||
66 | |||
67 | /** |
||
68 | * @Then I should get the same item |
||
69 | */ |
||
70 | public function iShouldGetTheSameItem() |
||
76 | |||
77 | /** |
||
78 | * @param $timeToLive |
||
79 | * |
||
80 | * @Given I store a an item in the cache for :timeToLive second |
||
81 | */ |
||
82 | public function iStoreAAnItemInTheCacheForSecond($timeToLive) |
||
86 | |||
87 | /** |
||
88 | * @param $seconds |
||
89 | * |
||
90 | * @When I wait :seconds seconds |
||
91 | */ |
||
92 | public function iWaitSeconds($seconds) |
||
96 | |||
97 | /** |
||
98 | * @Then I should not be able to retrieve it |
||
99 | */ |
||
100 | public function iShouldNotBeAbleToRetrieveIt() |
||
106 | |||
107 | /** |
||
108 | * @When I delete the item from the cache |
||
109 | */ |
||
110 | public function iDeleteTheItemFromTheCache() |
||
114 | |||
115 | /** |
||
116 | * @When I flush all the items item from the cache |
||
117 | */ |
||
118 | public function iFlushAllTheItemsItemFromTheCache() |
||
122 | |||
123 | } |